繁体   English   中英

SharePoint Online是否支持.webmanifest? 如何使用受支持的 webmanifest 文件创建 SharePoint 在线渐进式 Web 应用程序?

[英]Is .webmanifest supported by SharePoint Online? How can I create SharePoint Online Progressive Web Application with supported webmanifest file?

我正在尝试使用使用 Angular 8 PWA 生成的构建来创建 SharePoint 在线渐进式 Web 应用程序。 我能够让服务人员和应用程序正常工作。 但是,网络清单文件未正确加载。

我在 SharePoint 中创建了一个新的 ASPX 页面,并以这种方式添加了 webmanifest 文件:

<link rel="manifest" href="https://tenant.sharepoint.com/sites/SC/SiteName/mobile/SitePages/manifest.webmanifest" />

在 chrome 开发者工具中,manifest 文件总是等待下载:

没有这个,我在从移动设备浏览时无法获得“添加到主屏幕”功能。

是的。 SharePoint 支持清单文件。 它不工作的原因被视为跨源请求。

在清单链接末尾添加 crossorigin="use-credentials" 解决了这个问题:

<link rel="manifest" href="./manifest.webmanifest" crossorigin="use-credentials" />

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM