I entered a page and clicked on the store inside to perform ajax operation. I switched the style and clicked on the menu function inside to enter the menu page. There was a return on the page. When I clicked back, I found that I could not return to the interface with ajax. I could only return to the interface without ajax. Can anyone help me? Do you know what to do
I entered a page and clicked on the store inside to perform ajax operation. I switched the style and clicked on the menu function inside to enter the menu page. There was a return on the page. When I clicked back, I found that I could not return to the interface with ajax. I could only return to the interface without ajax. Can anyone help me? Do you know what to do
There are many ways; hash cookie localStorage, etc.
When using ajax to switch a single page, you need to save the history record, so that you can monitor the corresponding return action when you return, and then make the corresponding page switch.
location.hash and history.pushstate will help you
http://www.zhangxinxu.com/wor...
The legendary pjax
You need pjax
Use cookies to record a value passed to ajax. No matter how you open the previous page, the cookie value just now will be used, so that it will not change