You can use the following to get the previous URL.
var oldURL = document.referrer;
alert(oldURL);
More Related Contents:
- I need to make my bot in tic tac toe turn off after a certain amount of moves
- JavaScript open in a new window, not tab
- How to generate event handlers with loop in Javascript? [duplicate]
- How to open a Bootstrap modal window using jQuery?
- Getting around X-Frame-Options DENY in a Chrome extension?
- The value of “this” within the handler using addEventListener
- Function declarations inside if/else statements?
- Expression inside switch case statement
- Overriding Browser’s Keyboard Shortcuts
- Do browsers parse javascript on every page load?
- JavaScript curry: what are the practical applications?
- Passing Python Data to JavaScript via Django
- How to upload image into HTML5 canvas
- How does the $resource `get` function work synchronously in AngularJS?
- List All Prototype Properties of a Javascript Object
- JQuery Slider, how to make “step” size change
- For loop in multidimensional javascript array
- prevent touchstart when swiping
- Regular Expression – Extract subdomain & domain
- Remove attribute of HTML tag
- Node.js server that accepts POST requests
- ‘Access-Control-Allow-Credentials’ header in the response is ” which must be ‘true’
- Use JavaScript to convert a date string with timezone to a date object in local time
- Problem using elem.dataset with IE and JSFiddle
- WooCommerce: trigger event after change of variation
- Deep nested array of objects not rendering
- round off decimal using javascript
- What does this JavaScript/jQuery syntax mean?
- Why would we use useEffect without a dependency array?
- Chrome console clear assignment and variables