[Feature] use target site's cookie storage partition for cross-origin GM.xmlHttpRequest

Author: anonghuserCreated May 14, 2024Updated Jul 15, 2026
Labelsenhancementinteroperability

Since around the middle of 2023, chrome supports a new experimental attribute on cookies: see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#partitioned and https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies

It might be good for assuring users the cookie can not be used to track them across different sites, but It's breaking some use cases of GM.xhr For example, cloudflare adds this attribute to its anti-bot protection cookies and so GM.xhr returns HTTP 403 even for sites that the user has visited and already manually passed the anti-bot captcha.

It would be nice if GM.xhr can get an additional flag about whether to use the current tab's partition, or the partition of the site specified in its url argument.

Source: violentmonkey/violentmonkey