Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js window 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
Comment

window.history

var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?newParameter=1';
window.history.pushState({ path: newurl }, '', newurl);
Comment

PREVIOUS NEXT
Code Example
Javascript :: open bootstrap modal with javascript 
Javascript :: import modules js html 
Javascript :: iterate object 
Javascript :: javascript falsy 
Javascript :: javascript date convert to unix 
Javascript :: js get url variables 
Javascript :: javascript array move element one position 
Javascript :: add formdata javascript 
Javascript :: this.props.history.location.push 
Javascript :: start date and end date validation antd 
Javascript :: how to sort array without using sort method in javascript 
Javascript :: json data sample 
Javascript :: toast message angular 
Javascript :: convert queryset to json django 
Javascript :: redirect all request http to https express js 
Javascript :: javascript Using debugger 
Javascript :: javascript test if string starts with alphabet 
Javascript :: virtual dom explained 
Javascript :: axios error 
Javascript :: how to push array into array in angular 
Javascript :: json vs gson 
Javascript :: genius lyrics api 
Javascript :: automatically select current date in date input javascript 
Javascript :: js host without port 
Javascript :: how to know actual scroll js 
Javascript :: ifsc code yup validation 
Javascript :: check if value is boolean 
Javascript :: js get first element of array 
Javascript :: async constructor javascript 
Javascript :: javascript loop backwards through array 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =