Cache Bursting
Cache Bursting is a technique used in web development to improve the performance of websites by bypassing the cache for specific resources. This allows developers to ensure that users always get the most up-to-date content, even if their browser has cached previous versions.
One common use case for cache bursting is when a website is updated with a new version of a CSS or JavaScript file. By changing the file name or adding a query parameter with a unique value (such as a timestamp), developers can force the browser to download the updated file instead of using the cached version.
Here is an example of cache bursting in action:
- Before cache bursting:
<link rel="stylesheet" href="styles.css">
- After cache bursting:
<link rel="stylesheet" href="styles.css?v=123456">
By adding ?v=123456
to the end of the file name, the browser will treat it as a new resource and download the updated CSS file.
Cache bursting can also be used for images, fonts, and other static assets to ensure that users always see the latest version of a website.
For more information on cache bursting, you can visit the Wikipedia page.