How do I get the URL of the previous page in javascript?
Say, I go from page A to B, and use the browser back button to return to the page.
I have tried to use history.previous
, but I can not get it to work.
You can use the following to get the previous URL.
Var oldURL = document.referrer; Warning (OLDURL);
Comments
Post a Comment