Caching 灯塔及;聚合:服务工作者未缓存清单中的起始url
我正在测试我的聚合物应用,我在Lighthouse上得到了很好的分数。然而,我仍然有一个小问题。我有一个Caching 灯塔及;聚合:服务工作者未缓存清单中的起始url,caching,polymer,polymer-starter-kit,polymer-2.x,lighthouse,Caching,Polymer,Polymer Starter Kit,Polymer 2.x,Lighthouse,我正在测试我的聚合物应用,我在Lighthouse上得到了很好的分数。然而,我仍然有一个小问题。我有一个manifest.json文件,其中包含所有内容,因此可以将应用程序添加到主屏幕,但Lighthouse仍然给出一个失败提示:manifest start\u url未被服务人员缓存。。我正在使用Polymer Starter Kit 2.0,我不知道如何与服务人员一起缓存它。我有一个sw precache config.js包含: module.exports = { staticFil
manifest.json
文件,其中包含所有内容,因此可以将应用程序添加到主屏幕,但Lighthouse仍然给出一个失败提示:manifest start\u url未被服务人员缓存。
。我正在使用Polymer Starter Kit 2.0,我不知道如何与服务人员一起缓存它。我有一个sw precache config.js
包含:
module.exports = {
staticFileGlobs: [
'/index.html',
'/index.html?launcher=true',
'/manifest.json',
'/bower_components/webcomponentsjs/*',
],
navigateFallback: '/index.html',
};
其中/index.html?launcher=true
是清单的起始url。我认为在“index.html”文件中您有:
rel="manifest" href="manifest.json"
rel=“manifest”href=“manifest.json”
您必须通过以下方式进行更改:
rel="manifest" href="/manifest.json"
rel=“manifest”href=“/manifest.json”
你可以在这里找到谷歌团队提供的codelabs:
您是否正在使用
http/2
push?在我(仅)实现了推送资源之后,我从Lighthouse收到了相同的错误。不,我没有使用http推送