Service Worker缓存了根index.html

时间:2017-09-11 10:20:01

标签: html browser-cache service-worker

我需要从Service Worker缓存中删除index.html。我已经更新了代码,并从SW缓存中删除了html文件。

但是在这个新版本之前访问网站的旧用户仍在加载SW Cached index.html,这不会让新SW注册。因此,在访问域名时,页面仍在加载旧的index.html。

我可以解决这个问题。截至今天,9月11日。即使在具有修复的新版本之后,用户仍在查看旧的index.html。

enter image description here

1 个答案:

答案 0 :(得分:1)

我想您也可以将index.html重命名为index.htm,并从那里为更新后的服务工作者提供服务。