Manifest: Is it possible for a progressive web app to embed web manifest into html page?

Created on 6 Dec 2016  路  8Comments  路  Source: w3c/manifest

I would like to have a link to the manifest file in my index.html by embedding it as below, but seams not to be supported. I there a possibility to embed the manifest description in the web page?

<link rel="manifest" href="data:application/manifest+json;base64,PCVAIFBhZ2UgQ29udGVudFR5cGU9ImFwcGxpY2F0aW9uL2pzb24iICU+DQp7DQoJIm5hbWUiOiAiU2hhcmVQb2ludCBUaXRsZSIsDQoJInNob3J0X25hbWUiOiAiU1AgVGl0bGUiLA0KCSJkZXNjcmlwdGlvbiI6ICJUaGUgb25lIGFuZCBvbmx5IFNoYXJlUG9pbnQgU2l0ZSBUaXRsZSBwcm9ncmFtISIsDQoJInN0YXJ0X3VybCI6ICJpbmRleC5odG1sIiwNCgkiaWNvbnMiOiBbDQoJCXsNCgkJCSJzcmMiOiAiYW5kcm9pZC1jaHJvbWUtMTQ0eDE0NC5wbmciLA0KCQkJInNpemVzIjogIjE0NHgxNDQiLA0KCQkJInR5cGUiOiAiaW1hZ2VcL3BuZyINCgkJfSwNCgkJew0KCQkJInNyYyI6ICJhbmRyb2lkLWNocm9tZS0xOTJ4MTkyLnBuZyIsDQoJCQkic2l6ZXMiOiAiMTkyeDE5MiIsDQoJCQkidHlwZSI6ICJpbWFnZVwvcG5nIg0KCQl9LA0KCQl7DQoJCQkic3JjIjogImFuZHJvaWQtY2hyb21lLTI1NngyNTYucG5nIiwNCgkJCSJzaXplcyI6ICIyNTZ4MjU2IiwNCgkJCSJ0eXBlIjogImltYWdlXC9wbmciDQoJCX0NCgldLA0KICAgICJiYWNrZ3JvdW5kIjogIiNmZjAwMDAiLA0KCSJ0aGVtZV9jb2xvciI6ICIjZmZmZmZmIiwNCgkiZGlzcGxheSI6ICJzdGFuZGFsb25lIg0KfQ0K">

Most helpful comment

@RobDolinMS See also issue https://github.com/w3c/manifest/issues/535. My case is that I want to use a SharePoint document library to host my PWA, so I can execute my PWA in the context of a SharePoint site. See also my blogpost series at http://weblogs.asp.net/soever. On the request for the manifest the authentication cookie is not passed along on the request, so it can't read it from SharePoint. If I could embed during my build process of my main page I could solve this, but that isn't supported either it seems. I could only solve it by placing the manifest in a public place (my dropbox), with absolute link for the start_url. Not ideal. I also wonder if the lighthouse tool in chrome will work when the data could be embedded in the href.

What is the best place to report these issues with chrome?

All 8 comments

@svdoever Can you explain the use case for something like this?

@svdoever, that should absolutely work. Sounds like a bug in Chrome.

@RobDolinMS See also issue https://github.com/w3c/manifest/issues/535. My case is that I want to use a SharePoint document library to host my PWA, so I can execute my PWA in the context of a SharePoint site. See also my blogpost series at http://weblogs.asp.net/soever. On the request for the manifest the authentication cookie is not passed along on the request, so it can't read it from SharePoint. If I could embed during my build process of my main page I could solve this, but that isn't supported either it seems. I could only solve it by placing the manifest in a public place (my dropbox), with absolute link for the start_url. Not ideal. I also wonder if the lighthouse tool in chrome will work when the data could be embedded in the href.

What is the best place to report these issues with chrome?

Fwiw, we discussed this use case when we first started working on the spec. The solution showed here is supposed to work per spec.

When requesting the home page of the app it shows the request link, but can't show info:

pwa request of index aspx - manifest shows no data

The request headers of index.aspx (and all other loaded artifacts like images) show the cookie with authentication information:

pwa request headers index aspx

The link request to the manifest does not have the cookie with authentication information in the request header:

pwa request headers manifest webmanifest

In @svdoever's comment:

On the request for the manifest the authentication cookie is not passed along on the request, so [the browser] can't read [the manifest] from SharePoint
...
What is the best place to report these issues with chrome?

I found this link: https://support.google.com/chrome/answer/95315?hl=en but @mounirlamouri or @jakearchibald may be able to suggest a good place to report the bug you found in the way Chrome fetches web app manifests.

@RobDolinMS thanks for the link, i will report it there. In the mean time saved me to load the manifest from a site with authentication.

@svdoever can we close this issue?

Was this page helpful?
0 / 5 - 0 ratings