Updating text in gif files dating love ru arabic
You could adjust your server settings and change the EXPIRES headers, but the little technique I've written above is probably a much simpler way for you to go about it.Since caching is good, you usually want to set that date far into the future (a "Far-future Expires Header"), and use the technique described above to force a change.I will post my own solution as an answer, but I am curious if anyone has a better solution and I'll let your votes decide.Update: After allowing discussion here for a while, I have found John Millikin and da5id's suggestion to be useful./css/base.css, replaces it with a string containing the * file's mtime, i.e. Basically anything that is not dynamically generated.Simple Client-side Technique In general, caching is good..When the files change, it automatically changes the URLs so the browser has to re-fetch them.
Update: Rewritten to incorporate suggestions from John Millikin and da5id. */ function auto_version($file) This way, you never have to modify the link tag again, and the user will always see the latest CSS.You can then write a simple shell script that would compute the hash of the file and update your tag (you'd probably want to move it to a separate file for inclusion).Simply run that script every time CSS changes and you're good.On the other hand, if you're developing a website, you don't want to change the version number every time you save a change to your development version. So while you're developing your site, a good trick would be to automatically generate a query string parameter: Adding a query string to the request is a good way to version a resource, but for a simple website this may be unnecessary. It's also worth noting that the browser isn't necessarily stingy about keeping files in cache.Browsers have policies for this sort of thing, and they are usually playing by the rules laid down in the HTTP specification.
So there are a couple of techniques, depending on whether you're fixing the problem for yourself as you develop a website, or whether you're trying to control cache in a production environment.