Often when we design umbraco sites we setup the IIS to cache the css on clients for better performance. The problem we get is when we later update the css/js file, the clients don't update their versions.
You could extend the css file with a querystring like style.css?version=2
I have read that this approach isn't good since this will prevent some of the clients to NEVER store a cache version.
The suggested approach was to have the version in the url och filename instead. Like /assets/version2/style.css and handle the routing. I have used the Optimus bundle in some sites, and there made an extender to include the version in filename. The problem now is that I'm working on an old site, and don't want to install the plugin etc, just make a small update on the css.
Is there a simple way to handle such routing, or any other easy way to update the css and js on clients?
All (modern) browsers cache by query string parameter. The only thing I've heard that might not are some really old proxy servers with caching. But these are so seldom used that I wouldn't worry about it.
Versionhandle css and js to avoid client cache
Often when we design umbraco sites we setup the IIS to cache the css on clients for better performance. The problem we get is when we later update the css/js file, the clients don't update their versions.
You could extend the css file with a querystring like style.css?version=2
I have read that this approach isn't good since this will prevent some of the clients to NEVER store a cache version.
The suggested approach was to have the version in the url och filename instead. Like /assets/version2/style.css and handle the routing. I have used the Optimus bundle in some sites, and there made an extender to include the version in filename. The problem now is that I'm working on an old site, and don't want to install the plugin etc, just make a small update on the css.
Is there a simple way to handle such routing, or any other easy way to update the css and js on clients?
All (modern) browsers cache by query string parameter. The only thing I've heard that might not are some really old proxy servers with caching. But these are so seldom used that I wouldn't worry about it.
https://stackoverflow.com/questions/83990/is-it-the-filename-or-the-whole-url-used-as-a-key-in-browser-caches
is working on a reply...