4

How can I get the complete url like "http://twitter.com/#!/larrickchen" using something like document.refrerrer 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

larrick
  • 43
  • 1
  • 4

1 Answers1

5

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.

hayesgm
  • 8,678
  • 1
  • 38
  • 40