我有一个网站,其域的根目录中包含manifest.json。
/manifest.json(有关内容,请参见下文)
场景
当我检查Google灯塔审核时,它可以在首页上运行。
当我在子网址(例如/ test /)上对其进行检查时,来自lighthouse(在PWA下)的消息是:Timed out waiting for fetched start_url.
我不需要为每个子页面更改start_url,因为我希望start_url始终是主页。
有人知道为什么灯塔在抱怨,我该如何解决?
manifest.json的内容
{
"name": "My website",
"short_name": "My website",
"start_url": "/",
"icons": [
{
"src": "/assets/favicons/android-chrome-192x192-0eb7305556625ca6988c1f745f8de22ce1de04bdee9c129f8a04bf727dd4e23c.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/favicons/android-chrome-512x512-b5a1336abb27251a9b2baefc0a2789cd1fd8d644c9d8e006744f02daa323ab68.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
manifest.json的响应标头
alt-svc: clear
cache-control: private, max-age=0, no-cache
content-encoding: gzip
content-type: application/json
date: Mon, 18 Mar 2019 15:36:50 GMT
last-modified: Thu, 14 Mar 2019 12:54:03 GMT
server: nginx
status: 200
status: 200 OK
vary: Accept-Encoding
via: 1.1 google
x-request-id: 9eeb9731-9db0-43c8-bc98-9fed8a76fda2
x-runtime: 0.003905