CSS stylesheet changes are not reflecting

Sathish Kannan asked on June 14, 2016 13:29

Hi,

I'm updating CSS stylesheet in production environment but it fails to load the latest styles when I run the application. And I don't see my new style blocks in browser developer tools.

But I can see my latest changes in my stylesheet inside Kentico.

Any idea why Kentico is not giving latest stylesheet to the browser.

Thanks

Recent Answers


Brenden Kehren answered on June 14, 2016 13:33

There are a few things:

  • if you're using check-in/out, check the stylesheet in before you test
  • Kentico is delivering it to your browser but most likely, your browser has it cached. Clear your browsers cache or use an in-private browser session or use a different browser all together to test.
  • least likely, Kentico has a cached version "stuck". Simply clear the cache in Kentico or restart the website
1 votesVote for this answer Mark as a Correct answer

Sathish Kannan answered on June 15, 2016 12:26

Hey Brenden,

I tried all of your possible ways but still it is not working in Chrome (Version 51) and Firefox (Version 27) but working in IE 11.

Do you think any other idea that will work

Thanks

0 votesVote for this answer Mark as a Correct answer

Dennis Hulsmans answered on June 15, 2016 13:35

Hi Satish

Where and how are you including your CSS? Maybe you can probably add something like ?v=20160515 behind your css link.

example:

<link href="~/CMSPages/GetResource.ashx?stylesheetfile=/sitename/assets/css/style.css?v=20160506" type="text/css" rel="stylesheet" />

Small side note: We use a customer specific template css (as shown above), which they cannot change. Then we add an extra css file where they can fiddle with some css classes and stuff. I'm sure there are other ways but this is the one we are using atm.

2 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.