Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How often does iOS Safari clear its cache?

I use mobile Safari cache to store some data that I want to be persistent, so I would prefer that they would survive both Safari restarts and iOS restarts.

(Please don't suggest me to use cookies or Local Storage here - that's not what I am asking about.)

However I have read some new and some old reports that Safari clears its cache on Safari restart. But my non-scientific tests on Safari 8.3 showed me that sometimes this cache can in fact not only survive application restart but even the iOS reboot (!).

So I am a bit confused at this point.

Are the rules of iOS Safari cache clearing documented somewhere?

Does any of you know them and can explain them to me (and the world ;)?

like image 373
Greg Dubicki Avatar asked Jul 29 '15 10:07

Greg Dubicki


People also ask

Does Safari clear cache automatically?

No. Safari Preferences, General, has the ability to select a few options in "Clear History," including daily and longer periods.

Does iOS clear cache automatically?

If you want to free up storage space on your iPhone, clearing the cache is one way to do it. Some of this is done automatically by iOS, but you can also do it manually. The other reason to clear the iPhone cache is that cached files sometimes slow down the phone or cause things to behave in ways you don't want.

How often should you clear Safari cache?

With Average use, it is advised that you clear your cache every month or two to optimize performance. If your web surfing is more intense or you visit heavy websites, you should clear Safari Cache more frequently than that to have the best experience.

Does Safari clear cookies automatically in iPhone?

Answer: A: Short of Eric's recommendation to use private browsing, Safari does not offer an automatic means to remove all cookies when it is quit.


1 Answers

Hope someone find that I'm wrong but..

I searched a lot and I guess there are no resources about how the automatic cleaning policy works in Safari. And knowing Apple policy I guess that it's simply because this information is not necessary both for users and developers.

If you want to ask to Safari to protect your cache, you can use the Manifest File as described there: https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/Client-SideStorage/Client-SideStorage.html#//apple_ref/doc/uid/TP40002051-CH4-SW1

like image 136
Alberto Scampini Avatar answered Sep 29 '22 16:09

Alberto Scampini