Abhinav Garg Abhinav Garg - 1 year ago 205
Javascript Question

How to manually set REFERER header in Javascript?

I want to set Referer header of my webpage. Currently it displays "xyz" and I want to set it to "abc".

Viewed referer using

javascript:alert(document.referer)

ABG ABG
Answer Source

You cannot set Referer header manually but you can use location.href to set the referer header to the link used in href but it will cause reloading of the page.