104

Most Windows desktop browsers utilize the keyboard combination Ctrl + F5 to force a page specific cache refresh, while browsers running on macOS 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.

6
  • Is this what you are thinking of? apple.stackexchange.com/questions/73153/… Dec 13, 2012 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, 2012 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. Dec 13, 2012 at 20:15
  • Does pushing the refresh button in the address bar not refresh cached content as well?
    – Gerry
    Dec 13, 2012 at 22:01
  • Does this answer your question? How to clear the cache or do a hard refresh in Safari? Jan 7, 2021 at 22:25

12 Answers 12

61

Force quit did not work reliably for me in iOS 8. What did is using private mode for testing:

  1. Open the page in private mode (and bookmark it so you can open it later).
  2. When you need to refresh, close browser "tab" (you can stay in Safari and private mode).
  3. Open the page again (use the bookmark you created in step 1).
6
  • 6
    Not a great solution, but it seems to be the best that iOS gives us to work with.
    – Brendan
    Jul 14, 2015 at 17:12
  • 2
    How do I get to "private mode"?
    – linuxdan
    Mar 26, 2018 at 19:46
  • In Mobile Safari: tap the icon of two squares, which will show you all open tabs and reveal the "Private" mode button in the bottom left. support.apple.com/en-gb/HT203036 May 24, 2018 at 18:58
  • 1
    As of iOS 13.1.3 this doesn't work anymore.
    – timbo
    Oct 16, 2019 at 3:54
  • 1
    Opening a private tab doesn't seem necessary anymore. Just closing and reopening the tab is working for me. Mar 24, 2020 at 16:40
42

Tried some of the ideas above before I found this page.. Double-clcking doesn't work anymore in Safari.. Long-press switches to editing the URL now.. closing and reopening windows didn't help either...

But, one of the solutions for DNS errors, and connectivity issues worked.. it forced it to reload the cache since it thought it was on a new network.

Turn off WiFi, refresh the page (to fail), then turn WiFi back on. Page refreshed.

This fixes a number of issues, also seems to fix Airdrop as well.

8
  • 2
    THIS is the fastest way to refresh CSS on Safari iOS as of Aug 2020. Thank you! Aug 20, 2020 at 5:46
  • 3
    +1 This should be the top voted answer Apr 5, 2021 at 16:44
  • 4
    Quick note, I found toggling airplane mode simplified matters. Turn it on, reload page, and then turn it off reload page. Apr 5, 2021 at 20:52
  • 1
    This should be the accepted answer. Works like a charm.
    – gcoulby
    Jun 3, 2021 at 6:59
  • 1
    Silly Apple. Thanks!
    – rinogo
    Sep 7, 2021 at 1:29
25

If you have your phone wired to your Apple computer/laptop, with the Safari developer tools open (and active window) you can press:

Command + Option + R

5
  • 1
    I bet this works if you use a Bluetooth keyboard with your phone, as well.
    – rinogo
    May 29, 2019 at 1:38
  • @rinogo Negative. I use the apple magic keyboard on my ipad pro and "cmd+shift+r" does nothing in the safari browser. Sep 4, 2019 at 16:01
  • 1
    @danielson317 that's not what he said
    – H Johnson
    Jan 28, 2020 at 7:56
  • 1
    @danielson It would be "cmd+opt+r", using opt and not shift, in that syntax.
    – Zmart
    Mar 27, 2020 at 6:36
  • Comprehensive instructions to connect the iPhone with Safari developer tools are in another answer.
    – Melebius
    Jan 22, 2021 at 10:50
13

You can force the device to stop caching files by connecting it to a computer with a cable and enabling Safari developer mode.

  • Enable Web Inspector on the mobile device:
    Settings > Safari > Advanced > Web Inspector
  • Enable Dev tools in Safari on macOS:
    Safari > Preferences > Advanced tab > Show Develop in menu bar
  • Connect the device to the computer
  • Open the dev tools panel for the device from Safari on the computer:
    Develop > Example's iPhone > example.com/page
  • To disable caching, go to the Network tab and make sure the little icon for "no cache" is blue (looks like a cylinder with a crossout through it).
  • Now you should be able to just hit refresh anytime on the iOS device and you will get an up to date non-cached version!

If you're a web developer this is the ideal way to do it because now you have access to the extremely useful full dev tools panel. And you don't have to keep repeating an annoying process if you need to get a fresh version all the time, not just clear the cache once.

If you're just a general user trying to clear their cache, you might want to use one of the other methods here.


Update: You can now connect to the device over WiFi. May still require initial setup with the cable, but you can definitely connect without it after that.
Develop > Example's iPhone > Connect Via Network

1
  • 2
    Only solution that worked well for me. Thanks!!
    – rassom
    Jan 7, 2021 at 14:49
12

Delete the cached data for a single site by going to Settings > Safari > Advanced > Website Data > Show All Sites.

Tap Edit on the bottom right of the screen, and then scroll in the list or search with the search field to find the website you want to clear). Tap the red - icon next to the site address, and then tap the Delete button that appears.

Return to Safari and reload the page, and all the site's artifacts will be reloaded.

Depending on your version of iOS, you may need to slide left to reveal the Delete button.

4
  • This did not work. The items are not clickable on my iPad (iOS 12).
    – cheesus
    Jan 16, 2019 at 12:41
  • 1
    This did work for me - you need to ensure that you delete all domains that might be scope. Feb 19, 2020 at 15:26
  • If you're trying this for a site on a subdomain, delete the data for the parent domain.
    – jorisw
    Apr 20, 2020 at 18:17
  • Worked for me (iPadOS 14.6).
    – Mackaaij
    Jul 5, 2021 at 16:13
11

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.

Depending on your version of iOS, you may need to slide left to reveal the Delete button.

3
  • 1
    This is not working for me (iOs 7.0.4). Feb 17, 2014 at 18:59
  • 3
    With iOS 7, you toss the app upwards from the recent/multitasking list to force-quit it.
    – hotpaw2
    Feb 17, 2014 at 19:02
  • 2
    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)
    – fregante
    Jun 12, 2014 at 1:55
1

I made a small app for that: DevBrow

https://apps.apple.com/us/app/devbrow/id1547802958

Clears cache every website refresh, deletes cookies and automatic ads random parameter to the URL to force a complete reload.

1

"Request Desktop Website" followed by regular render worked for me.

-2

Double-tap the refresh button.

2
  • 8
    Does this work for anyone? Double-tap just stops the refresh that I started with the first tap.
    – Brendan
    Jul 14, 2015 at 17:12
  • Yes this was the only thing that actually worked for me. Not sure if this just kicks safari in the ass but it works. Apr 12, 2016 at 20:56
-2

On Safari enable the Developer-Mode. Then you can use the following combination to clear the Cache:

Option-Key + Command-Mac-Key + E 

I assume, that this will only drop the cache of the site you are on at that moment.

1
  • 3
    Unfortunately, your instructions only apply to the desktop version of Safari. The question was about the iOS version.
    – calum_b
    Oct 5, 2018 at 20:55
-4

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.

4
  • 4
    How does this work from the user side?
    – nohillside
    Jul 14, 2014 at 8:08
  • 1
    Append a random parameter to the URL at the top ...?rand=15 Jun 30, 2017 at 8:25
  • This is called "cache-busting," which causes the URL-string to be unique as the browser sees it. Thus, it will never find that URL in its cache. (And the host-side simply ignores the GET-parameter completely.) But, this is really not the same thing as what the OP is asking. Sep 14, 2018 at 14:47
  • @AaronDigulla This won't work for linked resources like CSS files and images.
    – Flimm
    Sep 17, 2019 at 10:14
-4

Long press refresh button. iPhone 6

1
  • 7
    That brings up a menu with "request desktop site" in Phone 7.
    – Flimm
    May 25, 2017 at 10:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .