Setting custom request header on a page redirect

A web page can not set HTTP request headers unless you are making an async request using XMLHttpRequest. In this case you are not, you are doing a redirect, like clicking on an href. Instead of relying on custom headers, depending on your backend use any one of these:

  1. Cookies
  2. GET variables
  3. POST variables

Leave a Comment