Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long are files usually kept in a browser's cache

How long are files usually kept in a browser's cache? I'm wondering about the general population - how long would I need to wait to be reasonable certain that most people's caches will refetch the file?

like image 218
B T Avatar asked May 19 '10 22:05

B T


People also ask

How long should cache last?

a. Thus they can be easily cached on the browser and on intermediate proxies and can be cached for a very long duration. Google generally recommends a time longer than 6 months or even a year for such content.

How long does it take for browser cache to clear?

Over time your cache will update to the latest changes, however, it can take it awhile (usually 24 hours). To speed the process along, you can clear your cache so that it takes the latest changes instantly.

How long does Chrome keep cached files?

The default is infinite. As newer files are added to the cache, old ones are purged to make space. The file won't actually stay in the cache for ever.

What is kept in a browser's cache?

The browser cache is a temporary storage location on your computer for files downloaded by your browser to display websites. Files that are cached locally include any documents that make up a website, such as html files, CSS style sheets, JavaScript scripts, as well as graphic images and other multimedia content.


1 Answers

It depends much on person, browser and settings.

Browsers usually reserve a certain amount of disk space, like 12 MiB, to this task. If a user stops using the browser it is indefinitely. If he/she uses the browser rarely, it will be until the expiration - either by internal policy or by HTTP headers. If he/she uses the browser heavily, it can be 12 minutes or even less.

I believe that it is hard to say 'in general' as I had a website on which 50% entries were from Firefox and 49% from Opera when IE at that point had over 75% market share. If the target audience of your site are users who use their browsers heavily, it can be very short. On the other hand if your site is only website visited it can be nearly never.

like image 58
Maciej Piechotka Avatar answered Sep 19 '22 23:09

Maciej Piechotka