W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

[XHR] What referrer to use when making requests

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 6 Jul 2012 15:30:04 -0700
Message-ID: <CA+c2ei-u0-oN2xo4qUCdjqmSuWuYCL3hzQCAAAVsgMwYdmL3gQ@mail.gmail.com>
To: Webapps WG <public-webapps@w3.org>
It's currently not specified what the 'referer' request header should
be set to when making requests using XMLHttpRequest. For example if an
XHR object is created by one document, and then passes the object to a
second document which calls xhr.open. Or if a page creates a XHR
object and then calls history.pushState some time before xhr.send is
called.

I propose that we use the "document's address" [1] of the
"XMLHttpRequest document" at the time when xhr.send is called. This is
way if an XHR object is passed between documents we are consistent
with xhr.open regarding which document address to use. And if a page
uses an XHR object to make several requests and call pushState between
these requests, we always use the most up-to-date document address
when the request actually hits the network.

[1] http://dev.w3.org/html5/spec/single-page.html#the-document-s-current-address

/ Jonas
Received on Friday, 6 July 2012 22:31:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:53 GMT