In the thinkpphp framework, using ajax to achieve "click to load more" on the list page, how to return without reloading the data?

The

scenario looks something like this:

A list page that lists, for example, more than 10 items for the first time, loads more items by "Click to load more" (10 items at a time). Then clicking on the product will take you to the "Product details Page".

the problem is that when you step back from the "Product details Page" to the "list Page", the list page is still the 10 items that were opened for the first time, and the data from clicking "Click to load more" is gone (you need to click again to load more). So that the user does not know which product I browsed, and has to reload every time I return.

what I want is that when you go back, the list page is still where it was last time. So I know where I browsed. And you can continue to browse the rest of the content.

For the

effect, please refer to JD.com "s mobile search page
https://so.m.jd.com/ware/sear.

.
Apr.02,2021

history.pushState 

all you need to do is save the previous list and scroll position. In that case. Every time the data is pulled back, it is stored in localstroage . If performance.navigation.type determines that it is going backwards, go and get the data

.

upstairs is right, another way is not to open a new page when opening the product details, but to load a layer (z-index) on this page and place it on top of the list page, and then click close to destroy the layer.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3733a-410b6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3733a-410b6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?