iOS6 - 如何清除主屏幕/独立Web应用程序的缓存? [英] iOS6 - How to Clear Cache of Homescreen/Standalone Web App?

查看:109
本文介绍了iOS6 - 如何清除主屏幕/独立Web应用程序的缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎Apple改变了主屏幕/独立网络应用在iOS 6中的工作方式。根据各种博文(示例)这些应用程序现在可以获得自己的专用空间来存储缓存文件,sqllite dbs,本地存储等,而不是像以前一样与Safari浏览器共享。

It would appear that Apple have changed the way homescreen/standalone web apps work in iOS 6. According to various blog posts (example) these apps now get their own dedicated space for storing their cached files, sqllite dbs, local storage etc, rather than sharing with the Safari browser like before.

在iOS 6开发之前我曾经虔诚地通过以下程序来清除缓存......

Before iOS 6 when developing I used to go through the following procedure religiously to clear the cache...


  1. 从主屏幕删除应用程序。

  2. 关闭Safari中的所有页面/标签。

  3. 最后清除Cookie和数据或设置>Safari中的清除数据。

不幸的是,现在Apple已经移动了目标,这个程序也是如此似乎没有用。清除之后,即使我的更改在Safari中被选中,当我添加到主屏幕并启动应用时,旧的HTML,JS等仍然被选中。

Unfortunately now that Apple have moved the goal posts this same procedure doesn't seem to work. After clearing, even though my changes are picked up in Safari, when I add to the homescreen and launch the app the old HTML,JS etc is still picked up.

有谁知道如何可靠地完全清除iOS 6中的缓存?

Does anyone know how to reliably fully clear the cache in iOS 6?

推荐答案

我无法验证正确清除缓存但这对我有用:

I can't verify the cache being cleared properly but this worked for me :

为此,您需要在iOS上允许Web Inspector设备。
转到设置> Safari>高级> Web检查器(必须处于活动状态)
您必须激活计算机Safari上的开发人员菜单。
转到首选项>高级>激活开发人员菜单

In order to do this, you need to allow Web Inspector on your iOS device. Go to Settings > Safari > Advanced > Web Inspector (it has to be active) And you have to activate the developer menu on your computer's Safari. Go to Preferences > Advanced > Activate Developer menu


  1. 使用USB连接线将设备连接到计算机

  2. 转到safari> Developpement>您的设备名称>检查应用程序(应用程序必须运行)

  3. 这将打开计算机上用于Web应用程序的检查器

  4. 检查员打开时清除缓存(命令+ alt + E)

  5. 检查员仍然打开时刷新计算机上的页面(命令+ R)

  1. Connect your device to your computer with the USB cable
  2. Go to safari > Developpement > Your Device name > Inspect an App (The app has to be running)
  3. This will open The inspector on your computer for the web app
  4. While the inspector is open Clear the cache (command + alt + E)
  5. With the inspector still open refresh the page on your computer (command + R)

不知何故,Webapp缓存被清除,我得到了非缓存代码。

Somehow the Webapp cache got cleared and i got the non-cached code.

这篇关于iOS6 - 如何清除主屏幕/独立Web应用程序的缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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