Doubts in CSS Caching

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
5/24/2013 8:30:20 AM
Gravatar
Total Posts 22

Doubts in CSS Caching

Hi,

I have read some documents ,questions in forums regarding disabling CSS caching. It has mentioned that while developing skin set value for the below to false.

<add key="CombineCSS" value="true"/>
<add key="MinifyCSS" value="true"/>

after developing it said that we have to revoke the changes. Why we have to revoke the values back to true? Why it won't be  false always?

Thanks in advance,

Rajeswari

5/24/2013 9:22:32 AM
Gravatar
Total Posts 22

Re: Doubts in CSS Caching

Why I'm asking this question is. If I clear the browser cache by click the Disbale Css Caching button as well as Reset Skin Version Guid. I can see the css design changes only in my PC. Not others. Why this behaves like this?

Please help.

Thanks,

Rajeswari.

5/24/2013 9:44:36 AM
Gravatar
Total Posts 2253

Re: Doubts in CSS Caching

Hi,

You do not want to change the CombineCSS and MinifyCSS to false. In the past it may have been suggested to do that. While developing a skin, the only items you should change are CacheCssOnServer and CacheCssInBrowser to false. After developing, you want to set these to true to help speed up your site. Without these set to true, every time someone opens your site the server must compile all of the CSS into a single file to deliver to the browser and the browser must download it.

The "Disable CSS Caching" button only disables caching for your login on your site. The "Reset Skin Version Guid" button changes the skin version guid which is appended to the URL for the CSS (/csshandler.ashx?skin=rocket_default&s=1&v=2.3.9.7&sv=ba284b60-fc95-481d-ad35-1e2f2a364cec). It is highly unlikely that the restting the skin version guid would not result in other machines not downloading the CSS again because the URL is completely different.

HTH,
Joe D.

5/24/2013 11:01:08 AM
Gravatar
Total Posts 18439

Re: Doubts in CSS Caching

Hi,

To clarify further. Those buttons for reset skin guid and for disable cache only work if CombineCss is true. Our csshandler.ashx serves up the css when that is true and there we have control over cache, the skin guid is appended to the url of csshandler so when it changes all users will load the new css since browser cache is based on url.

If you set CombineCss to false then csshandler is not used and links to all the static css files are included in the head of the page. We have no programmatic control over cache for static css files, they are served directly by IIS.

It is ok to set MinifyCss to false when working on a design but I recommend never set CombineCss to false.

Hope that helps,

Joe

5/25/2013 1:29:32 AM
Gravatar
Total Posts 22

Re: Doubts in CSS Caching

Thanks for your clarification Joe.To clear the cache every time, i need to use the button reset skin guid and  disable cache.

Without using this method,i want to see the css changes in my PC and others PC too.When i reset the skin guid i can see the changes in my PC only.Why those changes could not loaded on other's PC?

Thanks 

Rajeswari.

5/26/2013 8:26:28 AM
Gravatar
Total Posts 2253

Re: Doubts in CSS Caching

Is CombineCss set to true in your user.config? If it is not, the reset skin guid and disable cache buttons will not work.

Also, to clear the cache, you do not need to click both buttons, just the "Reset Skin Version Guid" button. Clicking the "Disable Cache" button will only disable cache for your account, no-one elses. Again, neither of these buttons will work if CombineCss has been set to false.

HTH,
Joe D.

You must sign in to post in the forums. This thread is closed to new posts.