Browser caching stores copies of your site's resources on a visitor's device so that on repeat visits, the browser can load them from the local cache instead of downloading them again.
When a browser loads a page, it downloads HTML, CSS, JavaScript, images, and fonts. With caching enabled, the browser stores these files locally. On the next visit, the browser checks if the cached files are still fresh. If they are, it loads them from the local cache � near-instant.
Cache behaviour is controlled by HTTP headers sent from your server. The Cache-Control header tells the browser how long to keep each file type.
Static assets (CSS, JavaScript, fonts, images): Cache for one year (max-age=31536000). These files rarely change, and when they do, the URL changes (cache busting).
HTML pages: Cache for a short duration or not at all (max-age=0 with ETag validation). Content changes frequently and you want visitors to see updates promptly.
Third-party resources: Respect the cache headers set by the provider. Do not override them.
When you update a CSS or JavaScript file, returning visitors may still load the old cached version. Cache busting solves this by changing the file URL when content changes.
Common approaches: append a version query string (style.css?v=2), use a content hash in the filename (style.a1b2c3.css), or use a build tool that generates unique filenames.
Our free audit covers security, SEO, performance, mobile, design, and content.
Get your free audit