updated on 19th of December
Thanks everyone who participated in the discussion! It was tremendously userful
So, what we are going to do initially is only support:
<link rel="manifest" href="...some URL...">
By virtue of this being a URL, if people really want to inline the manifest they can use a data:
URL:
<link rel=manifest href="data:application/manifest+json,{ ... }">
Credit to @yoavweiss for proposing the above on the public-webapps mailing list.
If, after some time, we find a lot of people are inlining manifests in the wild, we can return and look at alternatives - like using <script>
or <meta>
.
We are trying to create a new manifest format for the Web. It will allow you to define metadata for a web application in one place.
Right now, we are trying to decide how to "inline" the manifest into HTML. Need your feedback.
<!doctype html>
<html>
<head>
...
<meta name="manifest" content='{
"name": "Example",
"url": "/start.html",
"mode": "standalone",
"icons": [{
"src": "icon/lowres",
"density": "1",
"width": "64",
"type": "image/webp"
}, {
"src": "icon/hd",
"density": "2",
"width": "64"
}]
}'>
...
<!doctype html>
<html>
<head>
...
<script type="application/manifest+json">
{
"name": "Example",
"url": "/start.html",
"mode": "standalone",
"icons": [{
"src": "icon/lowres",
"density": "1",
"width": "64",
"type": "image/webp"
}, {
"src": "icon/hd",
"density": "2",
"width": "64"
}]
}
</script>
<link rel="manifest" href="app.json">`
OR
<script src="app.json" type="application/manifest+json"></script>
Please share it in the comments!
if this is only about where to make the manifest available and how, then linking definitely should be the way to go. this way all the REST mechanics can apply: potentially multiple media types (if somebody ever comes up with a different manifest format), and maybe even PATCH formats for manifests if there are huge manifests, and there should be a way how diffs can be communicated. use web architecture as much as possible, and in this case, any solution other than linking seems vastly inferior. define and register a link relation type, and make sure that the linking mechanism does not hardcode the manifest media type to it.