My project is a one-pager using simple css and js, gsap for timelines and animation.
I tested reloading my website with a button 'onclick' with window.location.reload(). Works fine!
If user swipes in browsers history, I tried:
window.addEventListener('pageshow', function (e) {
if(e.persisted) {
window.location.reload();
}
On desktop it works. On Android it works. But on IOS mobile pure chaos. It seems that scripts are loaded several times, the performance is slow, all browsers,...
How can I reload the whole website on mobile after using browser history navigation?
br chris