Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Most Windows desktop browsers utilize the keyboard combination Ctrl + F5 to force a page specific cache refresh. Mac OS X based browsers tend to use Command + R. Is there an equivalent cache refresh for a single page in Safari running on iOS?

I realize I can manually clear the browser cache, but I'd prefer to only refresh for the page I am currently viewing.

share|improve this question
    
Is this what you are thinking of? apple.stackexchange.com/questions/73153/… –  bassplayer7 Dec 13 '12 at 20:02
    
@bassplayer7 it is close but not quite the same. Command + R only refreshes the resources for the specific page you are dealing with. Meaning that externally linked JavaScript from a CDN would also be refreshed. This excludes resources which are not referenced. It's a very fine grained control afforded to desktop browsers and is super handy for web development. –  ahsteele Dec 13 '12 at 20:08
    
Makes sense. As a web developer, I understand your point ofhow convenient it is. I'm assuming that you already do, but I can't help not mention it - I use this app from Adobe for my mobile work. And, I believe restarting the Safari - cumbersome as it is - is at least more of a refresh then the button. I haven't messed with it enough to know exactly what it is refreshing, though. –  bassplayer7 Dec 13 '12 at 20:15
    
Does pushing the refresh button in the address bar not refresh cached content as well? –  Gerry Dec 13 '12 at 22:01

2 Answers 2

If you force quit Safari (click the home button, then double-click the home button, press and hold the Safari icon in the multitasking bar, then tap the red dot), it appears that Safari will clear its cache. But this will clear the entire cache, not just a single page.

You can also clear Safari cookies and data in the Settings app. Under Advanced you can clear data from individual websites, which may work if you know all the sites associated with the web page you want to flush.

share|improve this answer
    
This is not working for me (iOs 7.0.4). –  Nabil Kadimi Feb 17 at 18:59
2  
With iOS 7, you toss the app upwards from the recent/multitasking list to force-quit it. –  hotpaw2 Feb 17 at 19:02
    
iOS 7.1 here, I checked via Safari's remote developer tools and it seems that the resources are indeed not cached after force-quitting the app (Timelines > Network requests) –  bfred.it Jun 12 at 1:55

you can add random number get to the script or link src like :

<link rel="stylesheet" href="css/main.css?rand=<?=$rand;?>" type="text/css" /> <script type="text/javascript" src="js/main.js?rand=<?=$rand;?>"></script>

this forces Safari to reload the file, cause it thinks it is a different file.

share|improve this answer
2  
How does this work from the user side? –  patrix Jul 14 at 8:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.