1

I want to set a custom http header before navigating from one website to a another.

Here is a question and answer describing how to navigate in Javascript, but there is nothing in there about setting a header. Nor can I find one after extensive searching. How to redirect to another webpage in JavaScript/jQuery?

Does anyone know how I can do this?

Thank you.

Community
  • 1
  • 1
BradleyH
  • 13
  • 3

1 Answers1

0

You cannot.

The only time you can set a custom HTTP header in browser-side JavaScript is when you use XMLHttpRequest. There is no way to do it when triggering browser navigation.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335