HTTP_REFERER the same site but works in Javascript?

I’m trying to capture the HTTP_REFERER using PHP when clicking in from Google. If I print it out on the page after coming through, it says the referrer is the same site as I’m on.

I would assume it’s being redirected, but if I type document.referrer in the console, it correctly shows Google.co.uk. What is going on here?

Related posts

Leave a Reply

1 comment

  1. Okay, so this is really annoying. I found out what was causing it: My browser had a plugin that modified referrer information. Apparently it didn’t do so in Javascript so both ended up different.