Last updated Oct 27th, 2020 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$292 per month—let's make that $500!Learn more
Cachebuster allows you to easily control whether or not assets are loaded fresh from the server or versioned by a site version setting. Simply append the smartcache Chunk to the end of your asset URLs as seen below.
<link rel="stylesheet" href="[[++assets_url]]css/styles.css?nc=[[$smartcache]]">
cb.cachebust``System Setting is enabled the asset will never be cached by the browser. If disabled, it will return the current version of the website obtained from the
cb.site_ver System Setting. Adding the site version to the URL will ensure that when changes pushed to production returning visiting aren't loading stale files from their browser cache.
Cachebuster can set to a placeholder rather than returning a value. Simply pass the name of the placeholder you'd like to use as seen below.
To append a URL parameter to the result use the param paramater as seen below.