Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js update query string without refresh

if (history.pushState) {
    var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?myNewUrlQuery=1';
    window.history.pushState({path:newurl},'',newurl);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #update #query #string #refresh
ADD COMMENT
Topic
Name
5+5 =