November 17, 2017 at 7:27 am #28251
after entering a post page, if you return back to the blog posts list page by clicking the back button, the list reset to its initial display setup.
Imagine someone reading the posts from top to bottom. This is going to be annoying when they reach page X, to have to press X times on the ‘Load More’ button to read the next post.
Is there any way that a user could retrieve the last list state when he returns to the list page when clicking on the back button?
To see what I mean, here is the list page:
Just click 3-4 times on the ‘Load More’ button, enter a post and click on browser ‘back’ button.November 20, 2017 at 10:45 am #28276
Why not use the option to open the link to post in new window. I would use it all the time if I expect my users to come back to original page.November 20, 2017 at 10:17 pm #28292
My WP designer suggested me exactly the same solution…
I’m not sure that I like the option to open a new tab. I feel like it could be messy. The ‘open a new tab’ solution has a ‘spammy’ feel to it. A visitor could end up with dozens of tabs open by our site. There is no website that I like that does that… I think that this has the potential to annoy people.
Do you have examples of websites doing it that way so I can change my feelings about the idea? that seems unusual…
Like if I go on Youtube and browse a very long AJAX video list, scroll down a bit, click on a video and click the ‘back’ button, I will return on the video list exactly as I left it.
it is as if your js code reset its state without discerning if it is a fresh load or a load back…November 23, 2017 at 7:25 am #28343
Thanks for your feedback. It’s really tough to implement the functionality you are describing. We will probably need to update the URL on each load and then when the user hours the back button, we need to reload pages of posts in one go based on the URL thathat needs to be populated. Better option and more intuitive would be to open the post in a pop-up window of some kind and when the user hits the back button, you go back to the parent window. Basically we need to load the post window using AJAX as well just like we load pages of posts archives. May be you have better ideas -I am just thinking loud here. Can be done but can take time.November 24, 2017 at 6:04 am #28364
Ok, I get what you say about being tough to do.
I didn’t realize that when you press back, the page is automatically reloaded from scratch because of the page cache-control is set to no-cache.
I’m not really a WP dev so feel free to educate me. Where does the no-cache comes from? Is this built-in directly into WP or this come from WPBakery Page Builder?
I’ll probably live with the current behavior for now as I feel that going to the popup would be like replacing an annoyance by another annoyance….November 27, 2017 at 1:40 pm #28373
FYI, by using a cookie, browser session persistent storage (PersistJS) and by modifying the following files:
I made the filter selection persistent + your AJAX cache is persistent over different page visits during a single browsing session.
With some more work on the js AJAX cache, I could make this solution even better by giving back the last loading state persistent. ie: you have loaded 3 pages out 4, upon returning on the page, the same 3 pages fetched from the cache are displayed back to you.December 29, 2017 at 6:08 am #28783
I am glad to hear you are able to make these changes – I did not think of cookie solution before. Would love to have a look and see if we can incorporate the same into the product. Meanwhile, I am also working to solve some of these issues (though it won’t solve the load more or make filter persistent). I am exploring WordPress pagination (as opposed to AJAX) as one of the options to help users navigate back to the previous page open as part of pagination. It has its challenges when multiple grids are present in the page and I hope to make progress soon.
You must be logged in to reply to this topic.