Cache Busting in RW

The Cache busting links in RapidWeaver only affect the Support files like CSS and Javascript. RW simply adds a query string to the file name. That makes sure that the CSS and JS get refreshed along with the main content(HTML, PHP).

If you want the browser to “re-read” the main pages you need to do this with changes to the HTTP header.

something like this in the htaccess file would work:

# BEGIN Caching
<ifModule mod_headers.c>
<filesMatch "\\.(html|htm|php)$">
Header set Cache-Control "max-age=1, private, must-revalidate"
</filesMatch>
</ifModule>

That would tell the browsers that a .html or .php files can only be cached for 1 second.

1 Like