Web - Cache Bursting

> (World Wide) Web - (W3|WWW)

1 - About

A cache-buster allows the application to notify the browser to refresh the resources only when the application resources (content that may be cached (Javascript, CSS, Image).

A cache-buster will make the URL unique each time the content is new.

It can take the form of

  • a unique query string used uniquely to form a unique URL
  • or an unique file name with http rewrite
Advertising

3 - Syntax

my.js?ver=3.0.1
<!-- or -->
my-3.0.1.js <!-- with http rewrite rule to redirect to the file my.js -->

4 - Implementation

  • Manually add a cache buster when the file has changed
  • Automatically compute it for instance to Hash or Date Time value.
web/cache_bursting.txt · Last modified: 2019/04/14 14:25 by gerardnico