javascript - using window.location and window.history -


If you use Gmail, you will see that once you are logged in, and on the back and forward buttons Click, the page is not reloaded, and therefore navigation is really quick to do a little research, I have tracked about the window. History and windows Javascript's location It seems that these can be used to achieve Gmail's functionality. I want to use it on our site, as the user clicks on the back and forward button once every time. I've got this doctor (window history):

But what does the history.back () method run for example? I think they are called when a user clicks the back button in the browser? But how do you know when the user clicks on the back and / or the forward button, so that you can take the necessary action in your code?

Should anyone have a good JS Bella on the use of the window, it will be appreciated

"Javascript History Object - Property of the Window Object - An array in the list of previously visited URLs. In this article, we present the History object properties and methods, length, current, next, previous attributes, back () Forwards () and go () methods will look with syntax and examples.

Most , Javascript history object is used to simulate the back button of the browser:

href = "javascript: history.go (-1)"

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -