我正在尝试优化我的移动网页的加载速度,为此我正在使用该网站:
这个网站评估我的来源并告诉我我可以改进什么.在我的网站上我下载了一个字体:
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)
并且显然这阻止了我的页面的渲染.现在,如果这是JavaScript我可以使用async标签中的单词,它将解决问题,但这不是我正在加载的javascript文件!
反正有没有阻止我的浏览器阻止我的浏览器,并迫使它等待下载?
我正在为 PWA 开发 gatsby 主题/启动器,但我似乎无法摆脱以下控制台警告:
The resource https://davidde.github.io/gatsby-starter-simpwa/page-data/offline-plugin-app-shell-fallback/page-data.json
was preloaded using link preload but not used within a few seconds from the window's load event.
Please make sure it has an appropriate `as` value and it is preloaded intentionally.
Run Code Online (Sandbox Code Playgroud)
首次加载时一切正常;服务工作者像它应该的那样注册并且没有警告。但是,重新加载后,会出现此警告。这是没有意义的,因为该as值被设置为 'fetch'。我假设它有事情做与配置gatsby-plugin-offline或可能gatsby-plugin-manifest。
源代码位于https://github.com/davidde/gatsby-starter-simpwa,
并部署到https://davidde.github.io/gatsby-starter-simpwa/。
有谁知道是什么原因造成的?