Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get the last url using Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 242
    Comment on it

    Hello Reader's! If you are stuck in a condition where you need to redirect old url. Then the quickest way to get previous url is by Javascript. By using the document.referrer function.

    Let's see the example below:-

    <script>
    var oldURL = document.referrer;
    alert(oldURL);
    </script>
    

    As this script will execute it will make an alert box saying the old redirected url in it. And you can now it any where.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: