clearing Safari/iOS cache?

Is there a way to clear iOS Safari's cache? Or disabling it?

When debugging a website on iOS, running into a situation where content is being cached despite repeated reloads. Going to Settings on the device to clear the cache is, apart from being tedious, is a nuclear option as it also clears everything else including cookies. I still use my iPhone for regular surfing…

Answered by KMT in 141173022

Unless you can dedicate a debug-only device, this may be your best option:


https://support.apple.com/en-us/HT203036

Accepted Answer

Unless you can dedicate a debug-only device, this may be your best option:


https://support.apple.com/en-us/HT203036

private browsing doesn't always work to keep the cache cleared. These products are awful for developers. You would think we would be able to disable the cache, but no those apple dimwits won't let us. Yes, you read that right. I'm frustrated as **** that I have to spend so much time figuring out how to develop on these **** devices because apple dimwits don't know how to make things simple or provide concise answers.

I had the same problem.
im not sure if advertising is allowed here - if so im going to delete the name and the link:
i made a small app for that problem - a simple browser that clears cache and cookies on every reload

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

"You would think we would be able to disable the cache, but no those apple dimwits won't let us."

They actually do. It's just the option is now hidden as a tiny inscrutable hieroglyph in the Network inspector tab. It looks like something telling you to not use spin cycle when you wash your webpage. It's a little cylinder with a line through it. "NO CYLINDERS!" How is that not just absolutely totally obvious?

Yeah. They're still dimwits. But you can disable the cache. If you can figure out how.

Connect your iOS Device withUSB cable to your Mac. Open Safari > Developermode. Choose Network > Clear Cache > click bin icon .

I'm running iOS in a simulator to debug multiple CSS issues in a webpage, and this cost me TWO HOURS today.

This is for the the latest Xcode on the latest MacOS (Sequoia 15.5) as of July 2025.

With the simulator open, run the following command to list your simulator containers:

ls -tr ~/Library/Developer/CoreSimulator/Devices/ | tail -n 1

This will get you a GUID like 2780B427-BB9B-4570-AC1B-7043BADB800C

Open Safari in the simulator at least once. You can leave it open for this operation as well. Run the following:

rm -rf ~/Library/Developer/CoreSimulator/Devices/[GUID FROM ABOVE]/data/Containers/Data/Application//Library/Caches/com.apple.mobilesafari/

Then hit the "home" icon in the toolbar of the simulator twice, to bring up the app switcher, and swipe Safari up to kill it. Launch Safari again and it will reload everything.

Nearly twenty years of iOS development... And this is what it takes to perform one of the most basic web developer operations.

Let me restate the above answer, because the forum text parser destroyed my command lines, turning some of the symbols into "italics" indicators.


I'm running iOS in a simulator to debug multiple CSS issues in a webpage, and this cost me TWO HOURS today. This is for the the latest Xcode on the latest MacOS (Sequoia 15.5) as of July 2025. With the simulator open, run the following command to list your most recently used simulator container:

ls -tr ~/Library/Developer/CoreSimulator/Devices/ | tail -n 1

This will get you a GUID like 2780B427-BB9B-4570-AC1B-7043BADB800C

Open Safari in the simulator at least once. You can leave it open for this operation as well. Run the following:

rm -rf ~/Library/Developer/CoreSimulator/Devices/[GUID FROM ABOVE]/data/Containers/Data/Application/*/Library/Caches/com.apple.mobilesafari/*

Then hit the "home" icon in the toolbar of the simulator twice, to bring up the app switcher, and swipe Safari up to kill it. Launch Safari again and it will reload everything, guaranteed. You can run the command before or after you kill Safari, but you do need to run it at least once every time before relaunching.

Nearly twenty years of iOS development... And this is what it takes to perform one of the most basic web developer operations.

clearing Safari/iOS cache?
 
 
Q