Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Browser History Manipulation

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 310
    Comment on it

    Hello Everyone!!

    Javascript can manipulate the browser history with the help of the some inbuilt function.The DOM window object can access the the history  with the history function.. It exposes useful methods and properties that let you move back and forth through the user's history.  the history provides some inbuilt method for manipulating with the history.                                                                         

    Here are some method provided by window.history: 

    1) For Moving Backward:- 


    2) For Moving Forward:-


     3) Moving to a specific point in history:


    4) You can determine the number of pages in the history stack by looking at the value of the length property:

    var numberOfEntries = window.history.length;

    5) We can add and modifies the history entries by using some methods:

    • var currentState = history.state;
    • history.pushState(stateObj, "a", "c.html");
    • history.replaceState(arg1 arg2 arg3);

 0 Comment(s)

Sign In

Sign up using

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: