javascript - How to solve the problem that ios returns js without executing it?
PHPz
PHPz 2017-05-16 13:38:25
0
2
491

Doesn’t Apple mobile phone execute js when returning to the previous page?

I stored the data on the current page, then history.back returned to the previous page, and took out the data on the previous page. There was no problem with Android, and there was no problem with Google Chrome, but Apple didn't get it. I feel it's because it didn't get it. The reason for using js.
Is there any solution?

PHPz
PHPz

学习是最好的投资!

reply all(2)
过去多啦不再A梦
window.onpageshow = function (e) {
 if (e.persisted) {
       window.location.reload(true)
 } 
}
迷茫

Under normal circumstances, js will be used when returning. It is recommended that you try alert on the previous page.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!