如何在IOS safari上禁用缓存? [英] How to disable cache on IOS safari?

查看:1880
本文介绍了如何在IOS safari上禁用缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在ipad / iphone上禁用缓存?我想为非缓存体验运行一些自动化测试。

Is there a way to disable caching on ipad/iphone? I want to run some automated tests for non-cache experience.

推荐答案

我偶然发现了一种在iOS上禁用Safari缓存的方法:

I just stumbled across a way to disable cache in Safari on iOS:

iOS


  1. 打开设置

  2. 导航至 Safari>高级

  3. 启用 Web Inspector

  4. 切换回到Safari并加载网页

  1. Open Settings
  2. Navigate to Safari > Advanced
  3. Enable Web Inspector
  4. Switch back to Safari and load a web page

桌面


  1. 打开Safari

  2. 导航至 Safari>偏好设置>高级标签

  3. 启用开发菜单

  4. 开发菜单中,选择 您的iOS设备名称 要调试的页面

  5. 在禁用缓存时按Command-Shift-R重新加载

  6. 奖励:这是计算机上检查iOS设备上的页面的完整Web Inspector

  1. Open Safari
  2. Navigate to Safari > Preferences > Advanced tab
  3. Enable the Develop menu
  4. In the Develop menu, select Your iOS Device Name > The Page You Want to Debug
  5. Press Command-Shift-R to reload while disabling cache
  6. Bonus: This is a full Web Inspector on your computer inspecting a page on your iOS device

如果您想要更永久的东西,y你要么必须代理路线或制作 UIWebView / WKWebView 禁用缓存的包装器应用程序。

If you want something more permanent, you'll either have to go the proxy route or make a UIWebView/WKWebView wrapper app that disables caching.

这篇关于如何在IOS safari上禁用缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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