Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use desktop webinspector to clear cache in mobile safari?

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.

like image 881
Himmators Avatar asked Oct 08 '13 14:10

Himmators


People also ask

How do I use Web Inspector in Safari on iPad?

To enable Web Inspector on iOSOpen the Settings app. Tap Safari. Scroll down and select Advanced. Switch Web Inspector to ON.

Can you clear cache without clearing history Safari?

While clearing Safari's cache alone will not delete your passwords, clearing your history and cookies can. That's because when you empty your cookies, you will lose their password data saved in Safari as well. And keep in mind that clearing your history also clears its associated cookies.


4 Answers

You can use Cmd + Option + 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 Cmd + Option + R, I could see the iPad requesting and receiving the new files.

like image 126
Eddie Fletcher Avatar answered Oct 17 '22 23:10

Eddie Fletcher


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

like image 27
Eli Avatar answered Oct 18 '22 00:10

Eli


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.

like image 5
gsxrboy73 Avatar answered Oct 17 '22 23:10

gsxrboy73


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)

like image 4
Ed Wilde Avatar answered Oct 17 '22 22:10

Ed Wilde