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!
regarding "We are trying to create a new manifest format for the Web" in the intro: isn't HTML5 defining just that in http://www.w3.org/TR/html5/browsers.html#offline ?
my guess this is more about the mechanics about how to to make it available? but isn't that also specified in HTML5 already? could somebody please briefly point out how this gist relates to what's specified in HTML5? thanks!