24

I've read the "answers" on this question, which is pretty much what I'm asking, but no one actually provides an answer. Nowhere in the Developer Tools (that I can see, anyway) is there a clear indicator of the current page's referring page. This is something that's really easy to find in Firefox; just right-click and choose Page Info.

Where is this functionality in Chrome? If it's in the developer tools, which tab is it under? If it's not, is there an extension I can use to get this info? I've tried the Web Developer extension, and can't seem to find this very basic piece of info there, either.

EDIT TO ADD SCREENSHOT:

This is what I see when I open Developer Tools in version 8.0.552.224 (newest available for Linux.) alt text

Per comments below (in case they get buried) this is what I've discovered about Chrome's built-in "referrer-finding":

  • I need to go to Resources, then choose the individual page or file, then choose Headers
  • It doesn't appear to work correctly for pages that were opened by right-clicking a link and choosing Open in New Tab (or Window.) I just opened the question that I linked to in my original post that way, and when I look at the referrer provided in the header link, it shows its own URL as the referrer, rather than this page's URL.

Can anyone explain why that would be? (I tried the same thing in Firefox and it showed the correct URL as the referrer.)

1
  • Perhaps you need to add what version of Chrome this is for @EmmyS
    – Ivo Flipse
    Commented Jan 11, 2011 at 10:11

4 Answers 4

19

Paste this code into the address bar:

javascript:alert(document.referrer)

or

open Developer Tools (F12) and type document.referrer in the console.

2
  • 2
    The F12 / document.referrer is the easiest approach. It appears that when you paste in a url that starts with "javascript:" into the address bar, chrome trims that part off, probably for security reasons. So you have to type that back in. This is in chrome 42.
    – nealmcb
    Commented Mar 29, 2015 at 14:26
  • The "referer" vs "referrer" thing is pretty comical.
    – lkraav
    Commented Apr 15, 2016 at 20:03
16
  1. In the Developer Tools, go to the Network view (if it wasn't open when you loaded the page, you'll need to reload to get it populated).
  2. Click on the main page request -- it should be at the top of the list.
  3. When you click, the right pane will probably show the HTML for it.
  4. Click on the "Headers" tab on the right side.

The Referer is shown in the list of Request Headers.

7
  • In your version @EmmyS, if you do not see 'Network View', it will be called 'Resources' Commented Jan 10, 2011 at 23:12
  • My version (9.0.597.45 beta) has both 'Resources' and 'Network' Commented Jan 10, 2011 at 23:21
  • I'm on 8.0.552.224 (the newest version available for Linux.) I've posted a screenshot up in my original post of what I see when I open developer tools' resources tab (there is no network tab.) Where exactly is the page request I'm supposed to click on?
    – EmmyS
    Commented Jan 11, 2011 at 16:43
  • OK, I did eventually find it, but damn is it buried. Isn't there some extension that would provide the info the way Firefox does, so that I can just right-click on the page and see the referrer?
    – EmmyS
    Commented Jan 11, 2011 at 16:45
  • Also, it doesn't appear to work correctly for pages that were opened by right-clicking a link and choosing Open in New Tab (or Window.) I just opened the question that I linked to in my original post that way, and when I look at the referrer provided in the header link, it shows its own URL as the referrer, rather than this page's URL.
    – EmmyS
    Commented Jan 11, 2011 at 16:49
1

There was a bug in Chrome where the browser would not send the Referer header if you right-clicked a link and selected "Open link in new tab".

This was fixed in Chrome 13.

1

Right click -> Inspect element -> Console -> write "document.referrer"

This property will be unset some times when the traffic is direct.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .