Can I control the HTTP headers sent by window.open
(cross browser)?
If not, can I somehow window.open
a page that then issues my request with custom headers inside its popped-up window?
I need some cunning hacks.
@sureshvv — No. You cannot control the headers sent there either. If it preserves login status that is because the login method doesn't use custom headers.
Make an HTTP GET request to the resource sending the authentication token in a header, setting its responseType to a binary data type, for example blob or arraybuffer. Download the binary data in a file using the "Save As" dialog from the browser, usually creating a download link for the binary data and clicking it.
open with a url with spaces: var msg = 'Hello, world! '; var url = 'http://yoursite.com'; var link = 'http://www.twitter.com/share?text=' + msg + '&url=' + url; window. open(link);
When window. open() returns, the window always contains about:blank . The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously.
Can I control the HTTP headers sent by window.open (cross browser)?
No
If not, can I somehow window.open a page that then issues my request with custom headers inside its popped-up window?
I need some cunning hacks...
It might help if you described the problem instead of asking if possible solutions would work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With