Design and CSS styles
Version 5.x > Design and CSS styles > How to avoid Css StyleSheet Cache ? View modes: 
User avatar
Member
Member
anji.anjee-gmail - 7/5/2010 12:09:44 PM
   
How to avoid Css StyleSheet Cache ?
Hi,
How to avoid Css StyleSheet Cache ?

Thanks
Anjee

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 7/7/2010 2:58:12 AM
   
RE:How to avoid Css StyleSheet Cache ?
Hello,

CSS styles are always cached - if the browser wants to be fast, it cannot allow to disable the whole cache. This is a typical problem with CSS styles, which are kept in the cache by default.

Best regards,
Boris Pocatko

User avatar
Member
Member
Nick.Robinson - freelance computing - 9/14/2010 2:58:23 AM
   
RE:How to avoid Css StyleSheet Cache ?
OK - they are always cached
How do you force a reload so that you can see the effect of your changes?

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/15/2010 6:41:34 AM
   
RE:How to avoid Css StyleSheet Cache ?
Hello,

This is a general web developing issue and not explicitly Kentico related. Please check the web for a solution. Some information can be found here.

Best regards,
Boris Pocatko

User avatar
Member
Member
Nick.Robinson - freelance computing - 9/15/2010 12:50:05 PM
   
RE:How to avoid Css StyleSheet Cache ?
THE PROBLEM

I looked at the reference which you gave but their problems seem to relate to stuff being cached in the Browser or in the IIS7 output cache. What I need to do is to make Kentico CMS look at an updated external .css file when it is building the output to be displayed.

SOLUTION
I can only get Kentico to look at the updated CSS if the CSS code is being held inside Kentico itself. Thus if I use inline CSS (eg using style='.....' attribute) in my Master Page code, that will work. It also works if you keep the actual stylesheet code in the Page Property view and edit it there. Every time you change it there, it is immediately visible when you go back to Page or Design view.

(This works but is actually easier to check it out, edit it and then check it in again as the Kentico CSS editor window is a bit smalll and cumbersome).

I have tried using an @import('path/to/MyStylesheet.css') statement but Kentico seems to use some form of cacheing for this, so it didin't work for me.

There may be other ways but this worked for me (ver 5.5). I understand you are going to have a new CSS edition in version 6. I hope that will fix the problem but it would be nice to be able to use an external editor and have Kentico use the latest version of any external .css files.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/20/2010 4:19:10 AM
   
RE:How to avoid Css StyleSheet Cache ?
Hello,

Thank you for sharing this with us. If you want to submit a requirement, please feel free to do this at Kentico user voice or directly through our e-mail (support@kentico.com).

Best regards,
Boris Pocatko

User avatar
Member
Member
jochen-318online.com - 1/24/2012 6:29:46 PM
   
RE:How to avoid Css StyleSheet Cache ?
Hi

I resolved this same issue by clearing the Kentico cache:

site manger > administration > system > clear cache

thanks