Jason Smith
Jason Smith

Reputation: 1

Aspx cache problem?

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

Upvotes: 0

Views: 549

Answers (3)

Jack Marchetti
Jack Marchetti

Reputation: 15754

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.

Upvotes: 1

Josh
Josh

Reputation: 10604

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.

Upvotes: 0

Code Silverback
Code Silverback

Reputation: 3224

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.

Upvotes: 0

Related Questions