Forums › Forums › Search & Filter Pro › double results in firefox & safari after using page back.
Tagged: cache backbutton double posts
- This topic has 4 replies, 2 voices, and was last updated 4 years, 11 months ago by
Trevor.
-
Anonymous(Private) May 5, 2020 at 10:32 am #242623
Hi,
I have a strange issue here. I’m using infinite scroll to load my posts. The results are shown using a shortcode and I made a copy of the results.php template.
In safari en firefox something strange happens when you scroll to the last results, than browse to one of the posts, and then return back to the posts index ( using back button in browser). This browsers ‘cache’ the last state of the page , so all posts are shown and the ‘you’ve reached the end’ message is shown.
However, when you scroll down some more, double posts are loaded and the ‘youve reached the end’ message is shown again.
Example:
You can test the issue here:
https://aanbod.nlverhuist.nl/1. scroll down to the end.
2. open a post
3. use back button ( in firefox )
4. scroll up and down some more. latest 3 posts are double resultsPost order is not set to random. The issue here is the backbutton cache in this browsers.
Is there any way to force a reload of the complete results ?Anonymous(Private) May 5, 2020 at 10:57 am #242633I found a solution by adding this to my .htaccess file:
Header set Cache-Control “max-age=0, private, no-store, no-cache, must-revalidate”
However, this makes my site quite slow.. images, filters etc are reloaded on every refresh.
Better would be that the infinite scrolling script would ‘recognize’ that all results are already loaded (after using the backbutton), to prevent double posts from showing up .. -
AuthorPosts