About the return / previous step of PC/ mobile

when loading js with the ready event, js was executed after trying browser forward and backward, mobile browser forward and backward, return, history return, and so on.

the result suddenly returns that the js will not be executed on the mobile. Baidu learned that there may be a gap in the cache mechanism, which can be solved through pageshow.

with regard to the use of pageshow, there will be some problems with js, which will be changed a lot. I wonder if there are any other problems with this event, and what is the difference between the sequence of execution and that of ready and load?

is there a better solution for different caching mechanisms to respond to js forward and backward?


there is no research on mobile. Please refer to: https://www.cnblogs.com/milo-.
feels well written, and the method and cache mechanism are compared.


the problem has been solved. To solve the problem of some browsers moving forward and backward without executing js, it is still through pageshow,. Get what you want to change, and you can continue to write it in other functions.


pageshow is used in conjunction with pagecreate

Menu