Mobile Web App not clearing cache properly

后端 未结 10 716
醉酒成梦
醉酒成梦 2020-12-13 06:29

I\'ve been developing a mobile web app for iPad and I\'ve been running into an issue while testing my code.

Occasionally, and seemingly at random, the iPad will st

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 07:15

    I'm having exactly the same problem with my web applications on iPad - sometimes, at random, the web app run in standalone mode wouldn't refresh a particular resource (HTML/CSS/JS file), despite killing every possible app, clearing Safari cache & history, rebooting, restarting wifi-connection, refreshing or removing the manifest file or putting the device in a microwave; even applying a sledgehammer proved to be futile.

    While I haven't found a "kosher" way to fix it, there is always a workaround - rename the resource.

    Simply change the name of the not-refreshing file. If you have a problem with, let's say, foobar.js not updating, rename it to foobar2.js and update the references to this resource in other files. This of course could be a pain in you know what (especially when after a week's worth of development you are at foobar12.js), but until we see an official fix to iOS or a working refreshing technique, it's the only way I know of to get it up and running.

提交回复
热议问题