Anyone knows if with jquery or general javascript, I can change the referrer from the header in an http ajax call?
basically I want it to be sent from my page but have a referrer from another page. Any information would be great.
You can not change the REFERRER property. What you are asking is to spoof the request.
One way to trigger an event is to use the jquery trigger function. Show activity on this post. function changeDate(){ $. ajax({ url, data: data, type: "POST", dataType: "json", success: function(cbdata) { update_table(cbdata); } }); } $('#selector').
The Referer header allows a server to identify a page where people are visiting it from. This data can be used for analytics, logging, optimized caching, and more. When you follow a link, the Referer contains the address of the page that owns the link.
The browser will overwrite the referrer always for the tests that I've done. Meaning you can't change the referrer of an ajax call.
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