From: "Cédric Finance" Date: 2007-11-09T04:36:18+09:00 Subject: Re: Faking the refering page with Mechanize ------=_Part_7192_19372227.1194550570086 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline the XMLHttpRequest Object has a method setRequestHeader so we can change the header from the request but i'm not sure that we can do an xmlhttprequest to a different domain than the current website. And in javascript, document.referrer is read only. On Nov 8, 2007 7:50 PM, Ehud Rosenberg wrote: > C=E9dric Finance wrote: > > I don't think that you can do what you want this way, the referer is se= t > > by > > your browser not by the website you are browsing. > > (Moreover, you are changing the referer from the request, not from the > > response). And I don't see why a server response > > could have a referer header. > > If you want to load a page with another referer from your rails app, tr= y > > to > > use some javascript to change the referer of the > > browser or make an ajax page request with the right referer (I think it > > should be possible to set the header from the ajax > > request). > > Yes, it has finally dawned on me that what I'm trying to do is not > really possible this way. I doubt it can be done using ajax, though it's > work a bit of research. > Anyway, thanks for putting me on the right track. > > > > -- > Posted via http://www.ruby-forum.com/. > > ------=_Part_7192_19372227.1194550570086--