iOS:Apple是否禁用了保存到主屏幕的Web应用程序的HTML5离线功能? [英] iOS: Did Apple disable HTML5 offline capability for web apps saved to the home screen?

查看:105
本文介绍了iOS:Apple是否禁用了保存到主屏幕的Web应用程序的HTML5离线功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用HTML5清单让iOS上的几个Web应用脱机工作方面做了大量工作。我遇到了其他所有人遇到的典型问题,并修复了这些问题,并且一切似乎都正常运行 - 除非将我的iPhone应用程序保存到桌面上。



如果我执行此操作然后启用飞行模式,则在尝试通过主屏幕访问应用程序时会收到以下警告:无法打开您的应用程序名称,因为它的没有连接到互联网。通过Safari浏览器访问应用程序 在离线时工作正常。



如果有人知道这是我的错误,甚至可能性很小一个解决方法,请告诉。



即使下载新的金融时报网络应用程序(使用广泛的localStorage支持做得非常好)也会在离线访问时导致错误从主屏幕



技术规格:使用iOS 4.3.3运行iPhone 4(但也看到了问题) 4.3.2)

解决方案

阅读完评论后(特别是Rowan的),我跑了更多的测试并找到答案:



不,苹果电脑并未禁用保存在主屏幕上的网络应用的HTML5离线功能,它的工作原理 - 大多数情况下。有一个错误会导致它无法工作。它似乎与你的清单设置没有任何关系(除非它可能下载了错误的清单或不完整的清单)。我们不知道它有多广泛,但修复方法是清除移动Safari缓存。



以下是步骤:


  1. 关闭网页应用(确保不是
  2. 清除Mobile Safari缓存:设置> Safari>清除缓存

  3. 重新打开应用程序(用于缓存)。
  4. li>
  5. 再次关闭网络应用程序(确保它不会在后台附近)。
  6. 启用飞行模式:设置>飞行模式
  7. >
  8. 重新打开该应用程序。


  9. 现在它应该脱机工作。如果没有,则可能是您应用中的单独清单问题。看起来像浏览器缓存的一个奇怪的错误 - 或者缓存完全满了?谁知道,但这就是答案。谢谢你们。


    I've been doing lots of work in getting a few web apps to work offline on iOS using the HTML5 manifest. I've ran across the typical problems everyone else has and fixed them and everything seems to be working fine—except in the case where I save the web app to the desktop on my iPhone 4.

    If I do this and then enable airplane mode, I get the following alert when trying to access the app via the home screen: "your-app-name could not be opened because its not connected to the internet." Accessing the app via Safari browser works fine while offline.

    If anyone knows if this is an error on my part, or even the slim possibility of a work around, do tell.

    Even downloading the new Financial Times web app (very well done with extensive localStorage support) results in an error when accessing it offline from the home screen.

    Technical specs: Running iPhone 4 with iOS 4.3.3 (but also saw the issue in 4.3.2)

    解决方案

    After reading the comments (especially Rowan's) I ran more tests and found the answer:

    No, Apple did not disable HTML5 offline capability for web apps saved to the home screen, it works - for the most part. There is a bug that will make it not work. It doesn't seem to have anything to do with your manifest setup (unless perhaps it downloaded a bad manifest or incomplete manifest at one point.) We don't know how widespread it is but the fix is to clear your Mobile Safari Cache.

    Here's the steps:

    1. Close the web app (make sure its not sticking around in the background).
    2. Cleared Mobile Safari cache: Settings > Safari > Clear Cache
    3. Reopened the app (for caching).
    4. Close the web app again (make sure its not sticking around in the background).
    5. Enabled "Airplane Mode": Settings > Airplane Mode
    6. Reopened the app.

    It should now work offline. If it doesn't then its probably a separate manifest issue in your app. Looks like a weird bug with the browser cache - or perhaps the cache was completely full? Who knows, but that's the answer. Thanks guys.

    这篇关于iOS:Apple是否禁用了保存到主屏幕的Web应用程序的HTML5离线功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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