This is the same as clicking the Back button in your browser, or history.go(-1). History.replaceState() has identical arguments and is only used if you want to replace the current state with a new one. The back() method loads the previous URL in the history list. ?view=EMAILCONTENT&item=123 your application could analyze these values on start-up and return to the same place. In most cases, you’ll want to use parameters or a hash name, e.g. The URL can be anything - the browser won’t jump to that page, but could if the user reloaded the page or restarted their browser. You could use this to retain state information, e.g. Assume you’ve just displayed the result of an Ajax request: If you need to support IE9 and below, there are a number of shims including History.js and HTML5-History-API. The downside? Forget IE compatibility until v10 arrives. A handler function can retrieve the associated state and display the appropriate screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |