This is a fork of schnti/cachebuster plugin, with added functionality.
Differences to schnti/cachebuster
- Disable on local environment
- Detect and avoid modifying external links
- Preserve query string
- Hash instead of modified time
active
enable/disable plugin completelylocal
disable locally
You can control the plugin with the following line in your /site/config/config.php
:
return [
'schnti.cachebuster.active' => true (default),
'schnti.cachebuster.local' => false (default),
];
Add the following lines to your htaccess file:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\w+)\.(js|css)$ $1.$3 [L]