Open
Description
Here is the current design of the GM_cookie
API
- If
GM_cookie
is granted, then by default, cookies stored by the browser application are added for same originGM_xmlhttpRequest
requests. - If the
cookie
property ofdetails
is found in the requestGM_xmlhttpRequest(details)
,
then it will be turned into an array ofSet-Cookie
headers to be passed to HttpCookie.parse.ChromeXt
will then call CookieStore.add, and finally send the resulted cookies. - If the
anonymous
property ofdetails
is set totrue
, then for current request no cookies will be sent byChromeXt
, and response cookies are ignored. - With
GM_cookie
granted, the UserScript can and only can change the cookie store in the browser of current origin. No third party cookies can be saved into the browser by a UserScript. This design is due to the privacy protection of users. - Cookies during
GM_xmlhttpRequest
are managed internally in each session of browser. They will be reset when the browser is restarted.