iOS6 - How to Clear Cache of Homescreen/Standalone Web App?

前端 未结 9 986
悲&欢浪女
悲&欢浪女 2021-02-01 05:11

It would appear that Apple have changed the way homescreen/standalone web apps work in iOS 6. According to various blog posts (example) these apps now get their own dedicated s

9条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-01 05:46

    Try appending a unique GET tag to the ends of any and all href attributes, for example:

    
    

    This would generate href="/css/global.css?########", with a different number nearly every time. This forces iOS' Safari to pull the "new" page down, as there is no data in its cache originating from the same URI, and there likely never will be (unless you plan on reloading the app millions of times during development :D )

提交回复
热议问题