CSS files are not updated after change

I am running some coldfusion project on Lucee server but when I try to update style files, nothing happens. I can delete complete content in it and nothing is changed on website. Same goes for script files.

For CSS I found a way around and put my code directly in head.cfm file which is something I want to avoid. Where is the issue?

Don’t forget to tell us about your stack!

OS: Windows 10
Java Version: 8
Tomcat Version: no idea
Lucee Version: 6.0.0.585

HI @Aleksandar_Ar ,

Are you aware that the web browser caches CSS and Javascript files? If you make changes to CSS and Javascript files, you must clear your browser cache to see the changes. You can also rename the files if you want to force visitors’ browsers to pick up the new files.

1 Like

Hey there. You are right. I thought it is not relevant but after clearing it, it works. Thank you!!

What I do is just add a version number to the css

link rel=“stylesheet” type=“text/css” href=“mystyle.css?v=1.0”

Then increment the number when you make a change in the css file

1 Like

Insert a param after css file name eg
src=“style.css?ver=1.0”

and change ver number after any modify of your css

1 Like

Thanks everyone for the replies. All is good now :smiley: