I've made changes to a CSS file on my website. The browser is receiving a "304 not modified" message, even though there are changes to the file. Any ideas why this could be happening? How can I force my server to send the correct 200 OK message along with the updated file?

  • Forgot to mention I'm using IIS and Dot.Net 3.5 Armitage over 6 years ago

1 answer

1
point

add a parameter to your filename

e.g mystyle.css?randomnumber

that's usually enough to fool everything into getting the latest files.

Answered over 6 years ago by Tony Crockford
  • There are 4 other developers working with me. Even If I could convince them, it's kinda a pain to do this for every revision. Why doesn't this work right outta the box? Armitage over 6 years ago
  • Aggressive caching and the fact that changes to css files tend to be small and frequent. This might be of interest: http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html Tony Crockford over 6 years ago