Javascript-Static Page return

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.