我有以下分布。https://dhzcuvpl3uus.cloudfront.net
为了相似起见,我有两个对象:
当我第一次访问manifest.json
(https://dhzcuvpl3uus.cloudfront.net/manifest.json)对象时(在硬缓存或icognito模式之后),我可以看到它的内容。
然而,在访问index.html
对象之后,我失去了对manifest
json的访问。即使当我通过url请求manifest.json
对象时,它也会显示index.html。
它可以通过硬缓存来修复。
这种行为的原因是什么?
发布于 2018-07-20 05:14:35
原因是您的清单正在工作。
在你的清单上,你有
"start_url": "./index.html"
在你的index.html中,你有:
<link rel="manifest" href="/manifest.json">
因此,一旦调用了index.html,浏览器就会缓存"Web Application“启动URL为./index.html ...
即使您尝试访问-> https://dhzcuvpl3uus.cloudfront.net/shazam,它也会从manifest.json调用浏览器缓存中的内容
./index.html
Tl dr:您的清单正在工作,您的浏览器正在缓存。
https://stackoverflow.com/questions/51431178
复制相似问题