Implement the forward and backward functions under AJAX

Source: Internet
Author: User

This problem is always plagued during the process of making this BLOG ....

 

There are three methods to make a big difference:

1. Each time the client interacts with the server, it must change the URL value. In this way, IE will record the Historical Status of the page, so we can use IE's forward and backward to implement the present. This should be the most acceptable way for users, because everyone is also used to the browser's forward and backward functions.

 

2. Each time the client performs a function, an array is used to record the information on the next page, and the forward and backward buttons are added to the page to read the information in the array, so as to implement the forward and backward functions, but I think this should be the most undesirable way. Imagine when a user performs many operations on the client, the array used to record page information will become very large, so that the memory of the client will be eaten sooner or later, which is quite risky!

 

3. record the name and parameter information of each JAVASCRIPT method called by the client, and form an array. Add forward and backward buttons to the page to read the array, every forward and backward operation will re-Send the server. I feel that this method is implemented, but I am still pondering the method for creating this array.

I checked on the Internet and it seems that there is support for the class library of the first method, but I personally don't like it too much, it seems that every time the client overwrites the URL, it will also cause the progress on the status bar to be refreshed, you may say that it is okay to refresh the server and not send it back to the server, but it is uncomfortable. Alas, the problem is still not solved. You have to continue learning. Haha, it's off work. Continue Thinking tomorrow!

 

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.