0

I am beginner to Sitefinity.

I have made changes to Sitefinity Website, basically css and javascript. Everything was working fine on Dev and QA Environment.

But when the changes were deployed to live environment, it is not working or showing up on browser.

I can see the changes exists in files/code. But when viewed on browser, no change shows up in page source.

Another information, the MVC folder with all the changes exists in resource package folder in Sitefinity Website.

I have tried the following things, but nothing worked: 1. Restart IIS App Pool and website. 2. Turned the cache off on sitefinity backend, so the website loads everything again

Can someone guide me how it could be fixed or what might be causing this issue?

Thanks in advance!

Learner
  • 71
  • 1
  • 11
  • sitefinity aggressively caches things (it has it's own cache outside of the browser cache). depending on where your edited css/javascript is, it may not be enough to just clear the browser cache. for many pages, you can go into the settings and selectively turn cacheing off for them – GregH Feb 06 '19 at 21:20
  • First place i would look is to clear any Cache. Also clear your browser cache – Hasta Tamang Feb 06 '19 at 21:21
  • Hi @GregH, i have tried clearing cache on sitefinity backend, but it didnt work either – Learner Feb 06 '19 at 21:23
  • if you look at the production files and your changes are in them, i can just about guarantee you it's a cacheing issue if your changes worked in other environments. just a matter of finding and altering the proper cache setting. be sure to check cache settings at the individual page level – GregH Feb 06 '19 at 21:26
  • @GregH, do you mean checking cache settings in sitefinity backend for page level? – Learner Feb 06 '19 at 21:28
  • yes and i believe there are other cache settings you can tweak other than at the page level as well. i just cant remember where – GregH Feb 06 '19 at 21:30
  • Hi, @GregH - I tried clearing cache page level and globally from sitefinity, it didnt work. – Learner Feb 06 '19 at 22:17
  • 1
    Ok, so you made changes to .js and .css files and deployed them to production, but when you open these files using production URL - the changes are not there? Did the pages reference the same production URL as you or maybe a CDN url? – Veselin Vasilev Feb 07 '19 at 00:12

2 Answers2

0

You must do one of steps bellow before you deploy to live:

  1. Rebuild web project in VS. or
  2. Delete resource .dll from production bin\ folder. It depends what resources you use (Minimal, Bootstrap etc.)

Hope this helps.

Jordan
  • 187
  • 1
  • 5
0

So what I've done to add content versioning (can be used for either/both CSS or JS) is to create a helper that uses an auto incremented assembly version to bust the cache (using assembly number and not date). Worth noting that we're using cache behavior/parameters that are set in the web.config.

This method is then called on the default layout of the site like so:

<link href="@Url.ContentVersioned("~/css/default.css")" rel="stylesheet" type="text/css" />

Since that layout is used for each page of the site I know that whatever page they get to they are being served the latest version of css/js and the changes are picked up with each new build.