我正在制作一个应用程序,它将支持 Android Chrome 和 iOS Safari 中的“添加到主屏幕”功能。因为我希望对这两个功能提供普遍的离线支持,但我只想在必须的地方使用 list 文件,以增加我的控制力。但是,iOS Safari 不支持服务 worker ,所以我的问题是如果不支持服务 worker ,我如何只实例化缓存 list 文件,更具体地说;我知道我可以添加 manifest='whatever.appcache'
到 <html>
使用 JavaScript 标记,但浏览器(特别是 iOS Safari)会使用该缓存吗?
最佳答案
You could choose to use Service Workers and AppCache on the same web app. What happens in such a case is that browsers that don’t support Service Workers will use AppCache, and those that do will ignore the AppCache and let the Service Worker take over.
Sources: https://www.w3.org/TR/service-workers/#activation-algorithm, https://crbug.com/410665
感谢您的回答!
关于html - 如果不支持对 serviceworkers 的支持,则回退到 list 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40944071/