Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible for a progressive web app to embed web manifest into html page? #534

Closed
svdoever opened this issue Dec 6, 2016 · 8 comments

Comments

@svdoever
Copy link

commented Dec 6, 2016

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">
@RobDolinMS

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2016

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

@marcoscaceres

This comment has been minimized.

Copy link
Member

commented Dec 6, 2016

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

@svdoever

This comment has been minimized.

Copy link
Author

commented Dec 6, 2016

@RobDolinMS See also issue #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?

@marcoscaceres

This comment has been minimized.

Copy link
Member

commented Dec 6, 2016

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

@svdoever

This comment has been minimized.

Copy link
Author

commented Dec 6, 2016

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

@RobDolinMS

This comment has been minimized.

Copy link
Contributor

commented Dec 6, 2016

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.

@svdoever

This comment has been minimized.

Copy link
Author

commented Dec 7, 2016

@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.

@kenchris

This comment has been minimized.

Copy link
Collaborator

commented May 2, 2017

@svdoever can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.