首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Cloundfront在index.html上被锁定

Cloundfront在index.html上被锁定
EN

Stack Overflow用户
提问于 2018-07-20 04:26:30
回答 1查看 47关注 0票数 0

我有以下分布。https://dhzcuvpl3uus.cloudfront.net

为了相似起见,我有两个对象:

  • index.html
  • manifest.json

当我第一次访问manifest.json (https://dhzcuvpl3uus.cloudfront.net/manifest.json)对象时(在硬缓存或icognito模式之后),我可以看到它的内容。

然而,在访问index.html对象之后,我失去了对manifest json的访问。即使当我通过url请求manifest.json对象时,它也会显示index.html。

它可以通过硬缓存来修复。

这种行为的原因是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-07-20 05:14:35

原因是您的清单正在工作。

在你的清单上,你有

代码语言:javascript
复制
"start_url": "./index.html"

在你的index.html中,你有:

代码语言:javascript
复制
<link rel="manifest" href="/manifest.json">

因此,一旦调用了index.html,浏览器就会缓存"Web Application“启动URL为./index.html ...

即使您尝试访问-> https://dhzcuvpl3uus.cloudfront.net/shazam,它也会从manifest.json调用浏览器缓存中的内容

代码语言:javascript
复制
./index.html

Tl dr:您的清单正在工作,您的浏览器正在缓存。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51431178

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档