iPhone forces page refresh on going back on previous page
-
Hi
I installed your plugin and love it.
However I ran into problems with iPhone user experience. Problem is that in the product listing page user uses the filter and clicks one of the filtered products.
And after that user goes back to previous page, the product listing page. Now the page is reloaded which it doesn’t do when filters are not used.
Reload interrupts the user flow, adds delay and sometimes loses the current location user what looking in the product list. So this is a problem which has made me disable the filters all together in the mobile.
I tracked down what causes the reload to happen using iPhone. It is this part in the frontend.woofilters.js:
var prevLocation = location.href.split('#').shift(); jQuery(window).on('popstate', function (e) { var currentLocation = location.href.split('#').shift(); if (location.href.split('#').length > 1 && prevLocation === currentLocation) { return; } if (typeof window.wpfAdminPage === 'undefined') { location.reload(); } });If I comment location.reload(), iPhone works fine with the page and doesn’t force the slow reload. I’m not quite sure what is wpfAdminPage and why should the plugin force the reload if it is not set.
Can this behaviour be changed so iPhone users are not forced to reload when they use the “previous page” function of Safari browser?
The page I need help with: [log in to see the link]
The topic ‘iPhone forces page refresh on going back on previous page’ is closed to new replies.