manifest.json vs manifest.webmanifest

不打扰是莪最后的温柔 提交于 2020-03-21 11:12:28

问题


I'm developing an application using mongodb, Node.JS and PWA. In the first step of developing I don't know what is the difference between manifest.json and manifest.webmanifest.


回答1:


Actually there are no big difference rather than naming. So just use which you prefer: "/manifest.json" or href="/manifest.webmanifest" just don't forget that MIME type has to be: application/manifest+json in both cases.

<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="/manifest.webmanifest">

Note that spec says it should be manifest.webmanifest. And later it may be important because it is under heavy developement.

Look here for a little bit more info.




回答2:


November 2019 Update

The difference is mentioned in MDN (Mozilla Developer Network):

The .webmanifest extension is specified in the Media type registration section of the specification (the response of the manifest file should return Content-Type: application/manifest+json). Browsers generally support manifests with other appropriate extensions like .json (Content-Type: application/json).

You can read more details on: Media Type Registration



来源:https://stackoverflow.com/questions/52129281/manifest-json-vs-manifest-webmanifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!