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
    • 272
    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:-

    1. <script>
    2. var oldURL = document.referrer;
    3. alert(oldURL);
    4. </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
Reset Password
Fill out the form below and reset your password: