iOS 12 不支持部分 PWA 的离线功能 [英] iOS 12 does not support offline feature of some PWAs

查看:71
本文介绍了iOS 12 不支持部分 PWA 的离线功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 12 Safari 不支持某些 PWA(Progressive Web App)的离线功能.Safari 似乎没有正确缓存这些网络应用中的资源.

iOS 12 Safari does not support the offline feature of some PWAs (Progressive Web App). It seems like Safari does not cache resources in those web apps properly.

例如,以下 PWA 无法在 iOS 12 和 12.1 中离线工作,但它们都可以在 Android 或 Windows 上的 Chrome 中完美运行:

For example, the following PWAs cannot work offline in iOS 12 and 12.1, but they all work perfectly in Chrome on Android or Windows:

谷歌用来演示Service Worker的Air Horner PWA:
空气喇叭

The Air Horner PWA that is used by google to demonstrate Service Worker:
Air Horner

还有这两个:
2048 谜题
语音备忘录

重现步骤(100% 可重现):

Steps to reproduce (100% reproducible):

  1. 使用 Safari(iOS 12 或 12.1)访问 PWA
  2. 关闭 Safari 中的 PWA 选项卡
  3. 按下 iPhone 上的主页按钮将 Safari 设置为背景
  4. 按下 iPhone 电源按钮关闭屏幕
  5. 再次按下 iPhone 电源按钮以唤醒手机
  6. 关闭 iPhone 控制中心的所有网络连接(wifi 和蜂窝网络)
  7. 打开 Safari,再次访问 PWA --> Web 应用程序无法加载

这一直困扰着我很长时间,因为我自己的网络应用程序也有类似的问题 - 在 Android/Windows 上的 Chrome 中运行良好,但仅在 iOS 12 Safari 上失败.知道 iOS 12 Safari 有什么特别之处吗?非常感谢!

This has been bothering me for a long time, as my own web app also has the similar issue - works fine in Chrome on Android / Windows but only fails on iOS 12 Safari. Any idea what special in iOS 12 Safari? Thank you very much!

推荐答案

该问题已在我的 iPhone 6S 上的 iOS 12.1.2 中得到解决.

The issue is resolved in iOS 12.1.2 on my iPhone 6S.

这篇关于iOS 12 不支持部分 PWA 的离线功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆