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

manifest file extension should be webmanifest not json #342

Closed
gemal opened this issue Oct 29, 2017 · 7 comments
Closed

manifest file extension should be webmanifest not json #342

gemal opened this issue Oct 29, 2017 · 7 comments

Comments

@gemal
Copy link

gemal commented Oct 29, 2017

I believe the correct extension for the manifest file is webmanifest and not json

https://developer.mozilla.org/en-US/docs/Web/Manifest

@MMB1983
Copy link

MMB1983 commented Nov 15, 2017

Hi,
This is very confusing as different sources give different info:
https://developers.google.com/web/fundamentals/web-app-manifest/
https://www.w3.org/TR/appmanifest/
https://developer.chrome.com/multidevice/android/installtohomescreen

I haven't checked .webmanifest type but .json type work on android just fine :-)

@alrra
Copy link

alrra commented Nov 15, 2017

This is very confusing as different sources give different info:

I haven't checked .webmanifest type but .json type work on android just fine :-)

@mastakilla1983: @gemal Most probably opened this issue because of the sonarwhal project, that recommends the .webmanifest file extension, and the reasoning behind it is:

While the .webmanifest file extension is not enforced by the specification, nor is it required by browsers, using it makes it:

(from: https://sonarwhal.com/docs/user-guide/rules/rule-manifest-file-extension/#why-is-this-important)

@phbernard
Copy link
Contributor

I get the point, thank you for reporting.

@alrra You seem to be involved in this question. Quick question for you: as most web servers are not configured for the .webmanifest extension, they don't send this file with the proper Content-Type. Do we know how browsers that support the manifest (eg. Chrome) react to this situation? While I value standards and best practices, I want to make sure this change won't generate regressions.

@phbernard phbernard added this to the Package v0.16 milestone Jan 24, 2018
@phbernard
Copy link
Contributor

@alrra
Copy link

alrra commented Feb 12, 2018

@phbernard Sorry for the delayed answer.

as most web servers are not configured for the .webmanifest extension, they don't send this file with the proper Content-Type. Do we know how browsers that support the manifest (eg. Chrome) react to this situation?

Browsers (e.g.: Chrome, Samsung Internet) that have support for the web app manifest file don't actually care about what media type the file is served with, they just download it and parse it as JSON.

Deployed a minute ago.

👍

@phbernard
Copy link
Contributor

@alrra That's what I observed with Chrome. Thanks for the confirmation!

@shoulders
Copy link

shoulders commented Mar 9, 2018

The post OneSignal/OneSignal-Website-SDK#332 has some useful information on this subject.

For easier content searching: site.manifest manifest.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants