Answer the question
In order to leave comments, you need to log in
Why does safari cache page state when navigating back?
Hi all. Here such a thing turned out, when we leave the page, the animation hides the content on it before the transition occurs. So, if you press back in safari (any), it will return to the last state, that is, we will see a page with hidden content. How can you tell Safari to update the DOM state?
Thanks
UPD. Suddenly I found a way to fix, here is the code without details
window.onpageshow = function(event) {
if (event.persisted) {
window.location.reload()
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question