Javascript document.referrer with full querystring
NickName:Sideshow Ask DateTime:2014-05-15T23:33:28

Javascript document.referrer with full querystring

I am trying to get the full referring url to a page via javascript.

So far the closet I have come is

var lastUrl = document.referrer;

This does not include the query attached to the url.

var lastUrl = document.URL;

returns the current URL with the querystring intact.

Is there anyway of easily obtaining the referring url along with the referring query.

Copyright Notice:Content Author:「Sideshow」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/23682718/javascript-document-referrer-with-full-querystring

More about “Javascript document.referrer with full querystring” related questions

Javascript document.referrer with full querystring

I am trying to get the full referring url to a page via javascript. So far the closet I have come is var lastUrl = document.referrer; This does not include the query attached to the url. var l...

Show Detail

Javascript document.referrer with full querystring

I am trying to get the full referring url to a page via javascript. So far the closet I have come is var lastUrl = document.referrer; This does not include the query attached to the url. var l...

Show Detail

Retrieve full document.referrer URL

I'm trying to extract the keywords from Google search engine through document.referrer. The full referrer URL becomes like this: "https://www.google.com.pk/?gws_rd=cr&ei=LXxHVIb_JNC07Qae7oCwAg#q=

Show Detail

JavaScript document.referrer

I've got two webpages one <html> <body> <p><a href="page2.html">Link</a></p> </body> </html>&#x

Show Detail

document.referrer check for malicious code

I would like to assign a variable to be submitted with the form that passes the document.referrer value. I am using the below which works. However, I am concerned that someone could modify their do...

Show Detail

How to test the document.referrer on local?

I try to test the use of document.referrer in two local HTML pages but it doesn't work. Here is my code: HTML1: <body> <button type="button" name="button" onclick="go()&qu

Show Detail

IE did not set document.referrer

I observed it closely by debugging in IE that; IE did set document.referrer if I submit form or click any link but when I redirect to another page using javascript window.location, IE did not set

Show Detail

IE did not set document.referrer

I observed it closely by debugging in IE that; IE did set document.referrer if I submit form or click any link but when I redirect to another page using javascript window.location, IE did not set

Show Detail

Not able to capture correct referrer using javascript document.referrer

We are trying to capture referrer using javascript code document.referrer. But in some cases we are getting wrong output. In my case open Google.de and then search for "zalando" and then click on a

Show Detail

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-enc...

Show Detail