WebManifest.json中的范围,start_url和ID是否可以使用相对路径?
假设我们有一个可以通过不同环境获得的Web应用程序:
nightly.my-app.com
test.my-app.com
my-app.com
使用WebManifest.json
我们要标识应用程序的每个版本,但是我们不想为每个构建创建另一个WebManifest。因此,我们使用了这些值:
"scope": "./",
"start_url": "./",
"id": "./",
我的问题是:
这些值有效吗?浏览器/设备会自动解决应用程序的实际URL的所有值吗?
Let's say we have a web application which is available through different environments:
nightly.my-app.com
test.my-app.com
my-app.com
Using webmanifest.json
we want to identify each version of our app, but we don't want to create a different webmanifest for each build. So we used these values:
"scope": "./",
"start_url": "./",
"id": "./",
My questions are:
Are these values valid? Will the browser/ device automatically resolve all values to the actual URL of the app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您定义
范围
时,所有路径都将与之相关。参考 devrapterer.mozilla.org
它还说:
所以不用担心。这是合法的,可以正常工作。
When you define
scope
all the paths will be relative to that.referring to developer.mozilla.org:
It also says:
So don't worry. this is legit and will work fine.