[Greasemonkey] setting cookies from greasemonkey

Godmar Back godmar at gmail.com
Thu Jul 14 02:38:59 EDT 2005


Hi,

is it possible to have a greasemonkey script interpose whenever the
users visits a new URL, but *before* the request is being sent so that
the script has a chance to add some cookie that the browser will
present to the server?

This would be very helpful to customize web sites that change their
behavior based on cookies presented (search engines, etc.)

(I understand that the current setup, which interjects on
DOMContentLoaded, can't do that - I'm wondering if it is possible at
all in a firefox extension: if so, it could probably be added to
greasemonkey in some way - presumably only a hardcoded set of actions
since you don't want to execute code in chrome land outside a page.)

Related question: does anybody know how to pass cookies from inside an
extension when it opens a new window or tab?  Is there a way to tag on
http request headers to use? I should mention that I don't want the
cookies to be added to the list of cookies the browser stores.

 - Godmar


More information about the Greasemonkey mailing list