Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » Clearing CSS cache

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

Page: 1
Go to End
Author Topic: 4448 Views
  • PeteF
    Avatar
    Community Member
    8 Posts

    Clearing CSS cache Link to this post

    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

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Clearing CSS cache Link to this post

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

  • Mo
    Avatar
    Community Member
    508 Posts

    Re: Clearing CSS cache Link to this post

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

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Clearing CSS cache Link to this post

    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!.

  • borriej
    Avatar
    Community Member
    267 Posts

    Re: Clearing CSS cache Link to this post

    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.

    4448 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.