The cachebuster plugin generates the right filename with token, but the page needs to be reloaded to see any changes.
Ich habe eine Kirby-Seite am laufen die ich gerne mit dem Cachebuster-Plugin betreiben würde.
Im Prinzip funktioniert das Plugin auch, siehe Screenshots:
Doch immer wenn ich eine CSS-Änderung auf den Server lade und die Seite in einem neuen Tab öffne muss ich erst auf Reload drücken damit die Änderungen sichtbar werden.
Das ist doch nicht der Sinn, oder?
Hat jemand ähnliche Erfahrungen gemacht und kann mir vielleicht helfen?
Hier noch die .htaccess
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)\.(\d+)\.(js|css)$ $1.$3 [L]
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
#RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
#RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
RewriteRule ^site/(.*) index.php [L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
have you checked the cachebuster-token (bundle.token.js) before opening in new tab, after openining in new tab and after reload?
Are they always different?
This prompts the browser to check whether or not these versions are newer after one month is gone. In the meantime, they are fetched from the cache of the browser.
Typing the key<F5> instructs the browser to ignore this default setting of the web server.
So simply disable the above two lines by inserting "# " at the beginning of the line.
Those .htaccess settings should do nothing, it’s the whole purpose of the cachebuster plugin to enable caching of the files and then to bust the cache when changes have been made.
I tested the behaviour and could not reproduce it, the changes were visible as soon as I opened the site in a new tab.
Did you restart your webserver after the change in the file?
Did you delete his cache, If he uses something like this?
Did you delete the Kirby cache, if you use it?