Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js history

// go back:
window.history.back()
// go forward:
window.history.forward()
// go to specific point:
window.history.go(-2) // go back 2 pages, 0 is current page
window.history.go(0) // refreshes current page
window.history.go() // refreshes current page
// get number of pages in history
let numberOfEntries = window.history.length
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #history
ADD COMMENT
Topic
Name
6+3 =