In order to refresh a CSS file in cache, I often use the file.css?version=DDMMYYYY trick. However, I have a question about this method.
I'm working on an old extranet. All pages are using the same CSS file. The extranet doesn't have any template file and this css is included in every page of the extranet. I need to refresh this css file for all the extranet pages.
My question is : I want to use the file.css?version=DDMMYYYY trick on the login page. The other pages will still include file.css (without the ?version part)
If the user come on the login page, he will receive the new version of the css file. But which version will be used on the other pages? The old version (file.css) or the new version (file.css?version=DDMMYYYY) ?
In other words, when the user come on the login page, which files will be in his cache :
- file.css and file.css?version=DDMMYYYY
- only file.css, updated to the new version
I'm sorry for this beginner question but I have some difficulties to test it myself.
Thanks for your help!
?version=DDMMYYYYeverywhere? Just make sure to use the actual modification date of the css file or a static version number (not the current date).