1

I am using VS2010 to develop a cloud application. Previously I was using the Hosted Web Core but now it has switched to IIS Express.

Before if I made a change to CSS then all I had to do was refresh the page and it would pick up the new CSS. Now when I change the CSS I need to redeploy the application ( 3-4) minutes before I can see the effect of the change I made.

Is there any way that I could make it so I could straight away see changes to the source CSS or javascript rather than having to wait minutes to redeploy?

Angela
  • 3,269
  • 3
  • 22
  • 24

3 Answers3

1

No, however you may want to hold the shift key while clicking your browsers refresh button to reload the css.

I use IIS Express and sometimes have this issue, however it isn't related to IIS Express. Browsers don't re-download files it already has cashed recently. So forcing it to re-download will work and if you have made big changes to an active site and deploy it, you don't want the users to have this issue, you can do something like time stamping your files, or if it's not often just change the file name or file location so the browser will download a new one.

Take a look at this question: How to force browser to reload cached CSS/JS files?

Also, MVC4 with its new bundling may prevent this issue.

Community
  • 1
  • 1
Garrett Fogerlie
  • 4,450
  • 3
  • 37
  • 56
1

Reference the static content by appending the modify time to the URL

http://server/folder/file.css?201206241526347561423

The same as adding a cache buster to your other urls ...

Jack
  • 11
  • 1
0

Use incognito mode in your browser to avoid caching of styles sheets etc etc. http://david.dojotoolkit.org/recss.html is a bookmarklet that forces styles to reload which can also be a handy solution for this issue.

Also are you deleting or replacing newer files on the server when deploying the project? Check your CSS / JS file properties in vs. Ensure publish setting is set to always not only if newer

Sparkle
  • 2,459
  • 3
  • 18
  • 20