Use desktop webinspector to clear cache in mobile

2019-03-14 13:49发布

Is it possible to clear mobile safari cache using the desktop web inspector in Safari?

I know I can go to the settings in the iphone, but it's a bit of a hazzle and since the phone already is teathered to the computer while debugging, it would be really nice if I could clear it thourgh the webinspector in safari.

7条回答
ゆ 、 Hurt°
2楼-- · 2019-03-14 14:17

I came across this issue with safari 11.1, and the answer was really simple. There is actually a button on the right top corner of the network tab to disable caching when debugging. I thought about leaving this just in case someone else miss the button just like I did. ( the one in blue )

enter image description here

查看更多
啃猪蹄的小仙女
3楼-- · 2019-03-14 14:19

Old thread but if you have your iphone connected to your desktop developer tools, you can hit OPTION + CMD + E (shortcut for empty caches) while viewing the web inspector that is connected to the iphone. Then hit the refresh button in your iphone browser.

Make sure you are really connected (Develop > Your Phone Name > The Website being viewed on phone) It should show on your desktop developer tools dropdown menu.

Safari 11.1 High Sierra ios 11.4

查看更多
做个烂人
4楼-- · 2019-03-14 14:23

I'm using Safari 11.1 on a macbook, and using Web Inspector connected to an iPhone with iOs 11.2.6.

From the Web Inspector, if I use the key board short cut: OPTION + COMMAND + R, it both clears the cache and reloads the page.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-03-14 14:24

You can use SHIFT + COMMAND + R while in the developer tools web inspector to force mobile safari to reload its cache.

I had another problem which was that Fiddler also has a cache. I also had to clear that as I was running the iPad through the fiddler proxy.

Once I cleared the fiddler cache, and then used SHIFT + COMMAND + R, I could see the iPad requesting and receiving the new files.

查看更多
时光不老,我们不散
6楼-- · 2019-03-14 14:28

Well, there is an option for this in the Develop menu - however it doesn't appear to work.

A simple way around this is to add a new parameter to your url
eg. http://domain.com/testing.html?refresh=1

(of course having the functionality working in Web Inspector would be better)

查看更多
神经病院院长
7楼-- · 2019-03-14 14:33

Nothing here worked for me on iOs 11.4.1. After digging around in the network tab I found Command + K which is "Clear Network Items". I hope this helps someone.

查看更多
登录 后发表回答