0

Is there a way to detect in "popstate" event if the user has clicked the back button or the forward button ?

window.addEventListener("popstate", (e) => {
    // detect back or forward
});
Claudio Ferraro
  • 4,551
  • 6
  • 43
  • 78

0 Answers0