WWW FAQs: What happens if my browser cache isn't big enough?


2007-04-11: Fetching things over the Internet can be slow. To cope with this, web browsers temporarily cache pages and images so that they don't have to fetch them over and over.

Imagine a page that uses the same image over and over as part of the page layout. Fetching that image once doesn't take long. Fetching it fifty times takes an unreasonably long time!

But how big can the cache get? Most modern browsers, like Internet Explorer 7 and Firefox, make that decision automatically. Older browsers may allow the user to manually configure the maximum size of the browser cache. And some users wonder if their cache settings are too low.

Fortunately, there is no minimum cache size. If the cache is small, then the browser will have to fetch things over the Internet more often. But pages will still be displayed. It just takes somewhat longer to do it, because the components of the page are not already in the cache and must be fetched again from the website.

"Doesn't caching mean that I see old versions of pages?"

Not usually, no. The web browser will still ask the web server whether a newer version of the page or image is available (although it will usually not do this more than once in the course of loading a single page, for performance reasons). If a newer version is available the browser fetches that data again, replacing the old version in the cache.

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!