Skip to content Skip to sidebar Skip to footer

How To Open A Url Using Javascript And Set Custom Http Headers To The Request?

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 particu

Solution 1:

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).

Post a Comment for "How To Open A Url Using Javascript And Set Custom Http Headers To The Request?"