I’m doing a little bit of ajax where I get a static html file that is actually changed on the disk from time to time. Of course IE has a problem where it wants to help out by caching the file which I don’t want. I know how to fix this when grabbing a dynamic file: you just change the header in the dynamic file. But how do I do this for the static html file? Note that I am using apache.
Thanks
If you can use
mod_expiresas Marcel suggested, you can always append a random request parameter.For example, instead of requesting
static_file.htmlyou can requeststatic_file.html?_=1231231231and change that request parameter every time.jQuery has a really simple way of doing this: