如何在IOS safari上禁用缓存? [英] How to disable cache on IOS safari?
本文介绍了如何在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
- 打开设置
- 导航至 Safari>高级
- 启用 Web Inspector
- 切换回到Safari并加载网页
- Open Settings
- Navigate to Safari > Advanced
- Enable Web Inspector
- Switch back to Safari and load a web page
桌面
- 打开Safari
- 导航至 Safari>偏好设置>高级标签
- 启用开发菜单
- 在开发菜单中,选择 您的iOS设备名称 要调试的页面
- 在禁用缓存时按Command-Shift-R重新加载
- 奖励:这是计算机上检查iOS设备上的页面的完整Web Inspector
- Open Safari
- Navigate to Safari > Preferences > Advanced tab
- Enable the Develop menu
- In the Develop menu, select Your iOS Device Name > The Page You Want to Debug
- Press Command-Shift-R to reload while disabling cache
- 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屋!
查看全文