I want to redirect a user to a url through javascript after they click on a link. Now is there any way to send custom http headers along with this request. I want to send a particular cookie value with the request headers.
The url in question does not belong to my domain.
Is it possible to do it? If yes, how?
No.
You can set custom headers if you are using XMLHttpRequest (although it might ban you from setting a Cookie
header), but not otherwise (and a redirect is otherwise).
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