Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing the referrer of an Ajax POST

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.

like image 245
fmsf Avatar asked Nov 22 '11 17:11

fmsf


People also ask

Can I change referrer?

You can not change the REFERRER property. What you are asking is to spoof the request.

How do you trigger a change event after Ajax call?

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

What is referrer header?

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.


1 Answers

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.

like image 52
fmsf Avatar answered Sep 20 '22 20:09

fmsf