Top "Popstate" questions

Use this tag for questions regarding the "popstate" DOM window event that is fired when the active history item changes, and its related event handler "onpopstate".

Can I prevent history.popstate from triggering on initial page-load?

I'm working on a site that serves content via AJAX. If you click an item in the menu, a content …

javascript jquery history getscript popstate
pushState() and popState(): manipulating browsers' history

I am working on a small project in which I want to create an Ajax-style website. Content is loaded with …

jquery html pushstate history.js popstate
window.onpopstate is not working; nothing happens when I navigate back to page

I'm trying to add window.onpopstate on one of the pages on my site, but nothing is happening. I put …

javascript history popstate
binding popstate event not working

I have tried to type this code into the browser's console: window.onpopstate = function() {alert(1);} and then click the back …

javascript google-chrome firefox browser-history popstate
Is it possible to e.preventDefault in window.onPopState?

I'm trying to stop the user from going back in my web app. For this I tried catching the window.…

javascript dom-events back-button popstate
addEventListener("popstate") not firing for .document

Using Ajax and trying to create a popstate event handler on the actual Ajax page using the .document object: document.…

javascript ajax popstate
How to ignore popstate initial load, working with pjax

I have been trying to get the forward an back browser buttons to work on a small site using pjax …

jquery ajax pjax popstate
Javascript history state incorrect

I am trying to populate the index of the currently selected tab using history.pushState({tabSelected: 1}, null, ""); I have a …

jquery html pushstate popstate html5-history
Listening to onpopstate event on vuejs

I'm quite new to Vue and I'm trying to figure out how to listen to the onpopstate event on vuejs …

vue.js popstate