Tags
webapi
Created
Jun 20, 2016 2:40 AM
https://developer.mozilla.org/en-US/docs/Web/Manifest
If the manifest requires credentials to fetch, the crossorigin attribute must be set to use-credentials, even if the manifest file is in the same origin as the current page.
已经安装后 manifest 更新:https://web.dev/manifest-updates/
- 请勿更改Web应用清单文件的名称或位置,否则可能会阻止浏览器更新您的PWA
- 一天检查一次,进行比较,有更改时在所以相关窗口关闭后重新安装
- background_color //如启动画面背景
- description
- dir
- display
- icons 包含src,sizes(icon可以包含多个),type属性的对象 组成的数组 //128图标用于启动画面
- lang
- name
- orientation
- prefer_related_applications
- related_applications
- scope //导航超出范围返回一个正常的网页
- short_name
- start_url
- theme_color
https://developer.mozilla.org/en-US/docs/Web/Manifest#prefer_related_applications
新字段:
- 文件分享目标
- 快捷菜单
- 自定义协议
- 处理 URL // 弃用
- 处理文件
- 图标遮罩
- 截图
- 唯一 ID
- display-overlay: [window-control-overlay]
manifest 一旦加载就不能更改
允许使用 js 插入 manifest
允许跨域,start_ur/icon 需要使用绝对路径
不能使用 Link header