Do target=_blank URIs still pass on referrer data?
Asked Answered
R

3

6

I'm interested in using target=_blanks for links but as I don't want to do parameterized URIs I am worried about losing request-based data such as the referrer. Is that fear misplaced?

Roaster answered 10/12, 2010 at 20:36 Comment(1)
if i remember well, IE6 doesn't know to read reffers in blank windows.Easement
S
-5

Yes, referrer data is passed when targeting '_blank':

<a href="link" target="_blank">text</a>
Shaky answered 10/12, 2010 at 20:45 Comment(4)
can you cite a source?Outfoot
Doesn't work for me in the latest chrome. Using document.referer in the Chrome console returns an empty string.Fungible
If this used to work, it no longer appears to. And I don't think it's browser specific. I've got several links to my site right now from a popular blog. They all used target=_blank on the links. None of them pass a referrer on. Checked in Chrome and Firefox.Crumbly
wrong answer, referrer data is not passed when using target="_blank"Marmoreal
F
13

No. You can try this in the latest chrome by pasting the following into the address bar:

data:text/html, <a href="http://darwinandsierra.com" target="_blank">text</a>

Then click the link, open the Chrome console and type:

document.referer

It returns a blank string.

Fungible answered 4/3, 2016 at 21:14 Comment(1)
Yes, of course, as the document containing the link does not have a URL - it was opened from a data: source.Vanzant
M
3

All links pass referrer data, unless you manually configure your browser to not send that info.

Mesocarp answered 10/12, 2010 at 20:43 Comment(1)
Shouldn't there be a "don't" somewhere in the last part of the sentence?Eam
S
-5

Yes, referrer data is passed when targeting '_blank':

<a href="link" target="_blank">text</a>
Shaky answered 10/12, 2010 at 20:45 Comment(4)
can you cite a source?Outfoot
Doesn't work for me in the latest chrome. Using document.referer in the Chrome console returns an empty string.Fungible
If this used to work, it no longer appears to. And I don't think it's browser specific. I've got several links to my site right now from a popular blog. They all used target=_blank on the links. None of them pass a referrer on. Checked in Chrome and Firefox.Crumbly
wrong answer, referrer data is not passed when using target="_blank"Marmoreal

© 2022 - 2024 — McMap. All rights reserved.