How to get complete url from document.referrer when there are some special characters in it?
How can I get the complete url like "http://twitter.com/#!/larrickchen" using something like document.r开发者_Go百科efrerrer if it did come from "http://twitter.com/#!/larrickchen" ?? document.referrer only return "http://twitter.com/" instead of full path. I guess special characters(#!) make this happened. Does anyone know how to deal with it??? Edit
From Wikipedia:
A dereferrer is a means to strip the details of the referring website from a link request so that the target website cannot identify the page which was clicked on to originate a request.
From twitter, as far as I have seen in Firefox, the actual HTTP request headers are as follows:
Host: www.google.com
...
Referer: http://twitter.com/
Even though I came from http://twitter.com/#!/nytimes. Twitter ensuring user privacy by not exposing the specific page a user came in from. Without controlling the content on twitter.com, you won't be able to get the complete referring URL. Sorry.
精彩评论