0

When I update a js file in my asp.net project, I refresh the browser and the change shows up as expected. If I change a css file or an .aspx file, the change does not show in the browser. Not when I clear the browser's cache, not when I restart IIS (iisrestart). What could this possibly be?

PS. I have tried chrome and firefox

2
  • Are you using the development webserver that comes with Visual Studio? Or IIS? Web site project, or web application project? Commented Jan 11, 2011 at 17:56
  • I am using IIS. web application project Commented Jan 11, 2011 at 17:59

3 Answers 3

1

Your browser loves to cache files such as CSS, JS and XML docments.

Do a "hard refresh" to tell your browser to download everything again.

Typically, it's CTRL-F5

You can also append a random number to the end of the file name so that it's never the same and the browser will snatch it up each time.

Sign up to request clarification or add additional context in comments.

Comments

0

I have observed weirdness like this in chrome, but not firefox.

When you open it in firefox with firebug, are you seeing a 304 code? That might help separate server side issues from client issues.

Comments

0

I've had this problem a couple of times. Adding a random querystring value on the end of the URL for CSS seemed to fix things. So if your URL was /css/styles.css, just put in some code to add a random number on the end so the URL looks like /css/styles.css?random=2345.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.