简体   繁体   English

渐进式Web应用程序的局限性:将本机应用程序转换为渐进式Web应用程序

[英]Limits of Progressive Web Apps: transforming a native app into a progressive web app

I work in a Company and I got the task to check if it is possible to transform the current native app we are using into a Processing Web Application. 我在一家公司工作,我的任务是检查是否有可能将我们正在使用的当前本机应用程序转换为处理Web应用程序。

The main reason for developing a PWA is because of its offline functionality and because it will be accessible on every device (smartphone, tablet, desktop). 开发PWA的主要原因是因为它具有脱机功能,并且可以在所有设备(智能手机,平板电脑,台式机)上访问。

Native App: 本机应用程序:

The Application is about providing news, articles and different products to customers. 该应用程序是关于向客户提供新闻,文章和不同的产品。 Every customer (user) has his own profile and is only allowed to see certain products. 每个客户(用户)都有自己的个人资料,只允许看到某些产品。 Each product has at least one picture and at least as many documents for download. 每个产品都有至少一张图片和至少一样多的文档可供下载。

Question: 题:

Because there are alot of products, pictures and documents I am not sure till which point the PWA will be able to let the user see and download the pictures and documents of the products. 因为有很多产品,图片和文档,所以我不确定PWA到哪一点才能让用户看到并下载产品的图片和文档。

In best case every product will be displayed offline. 在最佳情况下,每个产品都将离线显示。 Due to the large amount of products and images, it is probably not possible. 由于产品和图片数量众多,因此可能无法实现。

What would be a realistic amount of content that would be available offline? 可以脱机使用的实际内容量是多少?

When may the transformation of a native app into a pwa become problematic? 将本机应用程序转换为pwa何时会出现问题?

It looks like your main bottleneck will be offline storage. 看来您的主要瓶颈将是离线存储。 The limitations consist in 2 things there: The amount of data you can store and the persistency. 限制包括两点:可存储的数据量和持久性。

Regarding the amount, the limitations are the following at the moment: 关于数量,目前的限制如下:

  • Chrome <6% of free space Chrome <可用空间的6%
  • Firefox <10% of free space Firefox <可用空间的10%
  • Safari <50MB Safari <50MB
  • IE10 <250MB IE10 <250MB
  • Edge Dependent on volume size 边缘取决于卷大小

https://developers.google.com/web/fundamentals/instant-and-offline/web-storage/offline-for-pwa (Check as well the section below:Current and future offline storage work) https://developers.google.com/web/fundamentals/instant-and-offline/web-storage/offline-for-pwa (同时检查以下部分:当前和将来的离线存储工作)

This is actually not a lot when it comes to images. 当涉及到图像时,实际上并不是很多。 You could however store a lower resolution of them offline and use the original resolution only when there is a connection. 但是,您可以将较低的分辨率离线存储,并且仅在有连接时才使用原始分辨率。

Regarding persistency, the handling is not the same on different platforms, but generally vague. 关于持久性,在不同平台上的处理方式并不相同,但通常比较模糊。 While chrome you meanwhile can ask for persistent storage (only the user can clear the storage, but not the system), in Safari the system can wipe your storage after a while. 虽然chrome您可以同时要求永久存储(只有用户可以清除存储,但不能清除系统),但在Safari中,系统可以在一段时间后擦除您的存储。 https://developers.google.com/web/updates/2016/06/persistent-storage https://developers.google.com/web/updates/2016/06/persistent-storage

See also: Is IndexedDB on Safari guaranteed to be persistent? 另请参阅: Safari上的IndexedDB是否保证是持久的?

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

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