[whatwg/xhr] Support for referrerPolicy (#297)

Fetch already supports setting referrerPolicy.
But as you know, Fetch is not always a better API than XHR for AJAX, such as progress updating, etc.
So adding support for referrerPolicy in XHR will be helpful.

So far I can only come up with an ugly workaround to support stand-alone referrerPolicy for every XHR request ---- just create a tag <meta name="referrer" content="{any referrerPolicy you want}">, and insert it into DOM before sending an XHR request, then remove this <meta> to clean up.
But the global Referrer-Policy setting of the page will not be restored as it was after the <meta> being removed. I tested it on Chrome 87.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/297

Received on Wednesday, 18 November 2020 16:39:45 UTC