[Greasemonkey] Question: what would happen if Greasemonkey sent the ID of every applicable user script with each request?

Matthias Bauer ml-greasemonkey-42imk83y at moeffju.net
Fri Apr 29 19:49:13 EDT 2005


On 29.04.2005 09:21 Nikolas 'Atrus' Coukouma wrote:

> I'd suggest adding a note in the default User-Agent header. It's the
> obvious place to put it and is easily changed if people want to. I'm
> thinking of something like:
> Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050415
> Firefox/1.0.3 with Greasemonkey

Please keep the User-Agent format standard-conformant.
Quoting HTTP/1.1 from
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43

__
14.43 User-Agent

[...] The field can contain multiple product tokens (section 3.8) and
comments identifying the agent and any subproducts which form a
significant part of the user agent. By convention, the product tokens
are listed in order of their significance for identifying the application.

       User-Agent     = "User-Agent" ":" 1*( product | comment )


3.8 Product Tokens

Product tokens are used to allow communicating applications to identify
themselves by software name and version. Most fields using product
tokens also allow sub-products which form a significant part of the
application to be listed, separated by white space. By convention, the
products are listed in order of their significance for identifying the
application.

       product         = token ["/" product-version]
       product-version = token


2.2 Basic Rules

[...]
   Comments can be included in some HTTP header fields by surrounding
   the comment text with parentheses. Comments are only allowed in
   fields containing "comment" as part of their field value definition.
   In all other fields, parentheses are considered part of the field
   value.

       comment        = "(" *( ctext | quoted-pair | comment ) ")"
       ctext          = <any TEXT excluding "(" and ")">
__

So, the way to go is either:

- add a product token:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050415
Firefox/1.0.3 Greasemonkey/0.3a

- or add a comment:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050415
Firefox/1.0.3 (Greasemonkey:0.3a)


Personally, I think Greasemonkey warrants a product token in its own right.


-Matt


More information about the Greasemonkey mailing list