2

I'm trying something similar to this: Force reload/refresh when pressing the back button

Unfortunately, the suggested code doesn't work in Chrome 41:

window.onpageshow = function(evt) {
// If persisted then it is in the page cache, force a reload of the page.
if (evt.persisted) {
    document.body.style.display = "none";
    location.reload();
}};

Is there a newer solution to this problem?

Thanks a lot!

Community
  • 1
  • 1
user1952748
  • 29
  • 1
  • 4

1 Answers1

2

Please check this question that addresses the problem using localStorage/sessionStorage.

Community
  • 1
  • 1
Bwaxxlo
  • 1,860
  • 13
  • 18