4 ms·
See how there's a hash mark # in there now, and the "q=test" is after it? The problem is that web browsers don't send anything after the # in the referrer strin
by dchest 18y ago
See how there's a hash mark # in there now, and the "q=test" is after it? The problem is that web browsers don't send anything after the # in the referrer string.
I wonder why they don't send it in referrer string. Are there any technical or security reasons?
- lacker 18y agoOriginally the content after the # was only used for automatic scrolling to particular tags within a page, so there was no need to ever send it to a server. Once Ajax came around, people realized you could use javascript to read the url after the # and do arbitrary stuff based on it. So you can show different pages at foo.com/ foo.com/#bar but since the server doesn't treat them differently, when the user transitions from one to the other, there's no page reload. So you can move from page to page, but cut n pasting links still works. There are libraries like RSH that let you do this to speed up your site.
- sqs 18y agoSeems to me that browsers ought to start including the fragment (the part after the #) in the referrer, now that different fragments can refer to entirely different pages. I can't see any security issues, as the previous poster was wondering.
- lacker 18y agoThere would be security issues if any existing website has put confidential user data after the #, expecting that no other website would see this in the referers. This doesn't seem typical, but still I'm sure some websites would have security issues if this was changed. Also, practically speaking, even if all browser developers agree this was a good thing, it takes quite a long time for people to upgrade their browsers.
- deleted 18y ago[deleted]