Check a product list to view 8th items, click to view the product, and then return to the product list page or display 8th items. How can this problem be achieved? Check a product list to view 8th items, click to view the product, and then return to the product list page or display 8th items. How can this problem be achieved?
Reply content:
Check a product list to view 8th items, click to view the product, and then return to the product list page or display 8th items. How can this problem be achieved?
We recommend that you open the new tab when viewing details. This is the best solution.
Other solutions cannot be avoided. If the product details are not returned to the List page, the product goes through other methods (for example, all the items are clicked in, after reading the details, I ordered a hot product.) What should I do if I enter the list page again? At this time, the List page may still be the one, maybe there is no commodity, or there is one, but the commodity is not 8th. What should I do?
The specific technology is definitely to use cookies or local storage, but if it doesn't solve the fundamental problem, it just doesn't solve the problem. If it doesn't solve the problem, what else can we do.
You can add a session to store the location viewed by the user, and locate it directly when going to the product list.
Refer to the laravel method.
The current link is put into the session, which is simple, fast, and error-free. Because the session will not be cleared before the browser is closed.
You can also put the cookie in it for the same effect.