Is `document.referrer` url-encoded or not?

I wrote a small test page to grab document.referrer of users with javascript and send it to a simple log server (like sendReferrer(document.referrer)).

The referrer Firefox sends is always url-encoded, (eg. 'http://www.google.com/search?q=%C3%9C' when referrer url is www.google.com/search?q=Ü)

But some clients (like IE9 on Win7) sends urls without url-encoding (www.google.com/search?q=Ü)

Is document.referrer is url-encoded in all browsers? Is this reliable (part of any standard) or not?

UPDATE: In Firefox15/Chrome21 (on ubuntu) document.referrer is url-encoded

Answers:

Answer

document.referrer isn't URL encoded I have recently tested it in all major browsers and it showed to be non encoded in every one of them.

Answer

My final answer for this question: Referer may/may not be encoded! With my tests some (only some!) IEs send unencoded referrers (I guess it depends on the locale of client system)

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.