CSS does not load when updated in an ASP.NET MVC 2 website

Posted by dannie.f on Stack Overflow See other posts from Stack Overflow or by dannie.f
Published on 2010-05-18T16:37:59Z Indexed on 2010/05/18 16:40 UTC
Read the original article Hit count: 354

I have a weird problem. Whenever the website designer updates the css file for the website I am working on. I overwrite the old css file with the new version and copy any new images. The problem is that whenever I do this the images in the website header no longer loads along with some other styles that depend on css loading some images.

I have tried everything, clearing the browser cache, deleting asp.net temporary files, restarting the browser, changing browsers and pressing Ctrl + F5. Still the images don't load. What usually happens also is that the problem would eventually correct itself and I wouldn't know why.

This driving me crazy. Does anyone else have the problem and know how to fix it?

If this helps, the header is located in a partial view and the master page loads the css file using Url.Content. The images are css sprites. This issue persists no matter which browser I try, Chrome, Firefox or IE. I am using Visual Studio 2008 SP1 on Windows 7 Ultimate. Other team members have experienced this issue.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about asp.net-mvc