Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Clearing CSS cache


Go to End


5 Posts   7367 Views

Avatar
PeteF

Community Member, 8 Posts

7 May 2009 at 3:27am

Hi

I have an issue on a site I'm developing. Basically I've created a new theme, each time I load the page I'm adding the '?flush=1' text to the end of the URL.
Although this is clearing the html cache it isn't refreshing the CSS.

I have created a directory called 'silverstripe-cache' in the root of my installation as recommended on a website I visited some time ago. Basically I've cleared the files in this directory too..... and still I have had no luck.

Anyone got any ideas? (apart from creating a new CSS file and then renaming the link to it accordingly - but surely I should'nt have to go this far to just make a small change to the CSS on my site????)

Kind Regards

Peter

Avatar
Fuzz10

Community Member, 791 Posts

13 May 2009 at 9:55pm

If the system is including the correct CSS file(s), it is probably a browser issue. Try manually clearing your browser-cache.

Avatar
Mo

Community Member, 541 Posts

27 May 2009 at 9:03pm

Try pressing CTRL + R or CTRL + F5 to do a forced refresh and clear your browser cache.

Avatar
Willr

Forum Moderator, 5523 Posts

27 May 2009 at 10:41pm

Yep SS does not touch your CSS cache (well at least most of the time). While developing a lot of us use the webdeveloper toolbar for firefox. This allows you to disable css caching. Handy!.

Avatar
borriej

Community Member, 267 Posts

3 August 2010 at 2:36am

Tried all the browsers, FF, Chrome, Safari... But all show the old css file.
The latest css is on my server, when i can download it from the and compare the code it is the latest one..

THE PROBLEM WAS:
I uploaded the layout.css in the images folder (!) Somehow SS knew this and changed the path... So it looked uploading the latest css to the correct directory.