btaaid.blogg.se

Scriptcase image resize
Scriptcase image resize





scriptcase image resize scriptcase image resize

I hate to be the bearer of bad news, but you don't have any other options. Why can't you use a timestamp (or etag, which amounts to the same thing)? Remember you should be using the timestamp of the image file itself, not just Time.Now.

scriptcase image resize

I CANNOT use the META tag method OR the timestamp method, because I want all of the images cached under normal circumstances. I can't imagine it'd be a good idea on part of browser developers to let you go poking around in their cache, and there's no motivation that I can see for them to ever implement such a feature. In all seriousness, I've never heard of such a thing existing, and I doubt there is an API for it.

scriptcase image resize

Untick all the checkboxes except make sure Cache is Checked.In the event that an image is re-uploaded, is there a way to CLEAR or REPLACE the previously cached image client-side? In my example above, the goal is to make the browser forget what "42.jpg" is You could also serve images via PHP script (they have awful cachability by default ) Ībove will make *-nocache.jpg files non-cacheable. If you have Apache and mod_headers or mod_expires then create. It pollutes caches with useless files and forces useful files to be purged sooner. Random URL for short-lived files is bad idea. If your image changes very often (every few minutes, or even on each request), then send Cache-control: no-cache or Cache-control: max-age= xx where xx is the number of seconds that image is "fresh". If you update images from time to time, allow them to be cached forever and use a new filename (with a version, hash or a date) for the new image - it's the best solution for long-lived files. To control caching you could change URLs each time their content changes. Whatever you do to the HTML document, it won't apply to images. In fact, you shouldn't try use it for controlling cache at all (by the time anything reads content of the document, it's already cached).







Scriptcase image resize