When does the popstate fire? What is it dependent on?
I found that popstate fires when the user presses back or forward button. But that does it mean it is the default behaviour of the browser. Suppose a website doesn’t use SPA, clicking on a link loads an entire webpage from the server. So the URL gets changed and a page gets loaded, pushstate or replacestate is functions only performed by user. So this click doesn’t performs any of this. Now if we click on the back button of the window this does not triggers popstate. Am I correct or both the thing are different? I mean we do not use pushstate/replace state but while pressing back or forward buttons do get fired?
When does the popevent fire? What is it dependent on?
I found that popevent fires when the user presses back or forward button. But that does it mean it is the default behaviour of the browser. Suppose a website doesn’t use SPA, clicking on a link loads an entire webpage from the server. So the URL gets changed and a page gets loaded, pushstate or replacestate is functions only performed by user. So this click doesn’t performs any of this. Now if we click on the back button of the window this does not triggers popevent. Am I correct or both the thing are different? I mean we do not use pushstate/replace state but while pressing back or forward buttons do get fired?