start_url 在离线时未响应 200
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
渐进式 Web 应用 (PWA) 的清单应包含 start_url
,用于指示在用户启动应用时要加载的网址。
如果浏览器在从 start_url
访问应用时未收到 HTTP 200 响应,则表示 start_url
不正确或该网页无法离线访问。这会导致已安装该应用的用户出现问题。
Lighthouse start_url
审核如何失败
Lighthouse 会标记启动网址在离线时未响应 200 的 Web 应用:
如何确保您的网页可供离线访问
- 如果您还没有 Web 应用清单,请添加一个 Web 应用清单。
- 检查清单中的
start_url
是否正确。
- 向您的应用添加 Service Worker。
- 使用 Service Worker 在本地缓存文件。
- 离线时,使用 Service Worker 作为网络代理,以返回文件的本地缓存版本。
如需了解详情,请参阅当前网页在离线时没有响应 200 指南。
资源
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-04-16。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]