Why when the local a.html page jumps to the b.html page

  javascript

Why when the local a.html page jumps to the b.html page
Binding in b.html
window.addEventListener(‘popstate’, function(ev){

alert(1)

})
Back to A after going to page B Why didn’t 1 pop up?

Brother, did you bind this event to page a? If you jump to page A again, it will be another interpretation of the code on page A of the team. Of course, it cannot pop up without relevant code. The upstairs said that the incident would not trigger, this one has not been used. However, these aspects are basically unavoidable.