Any time you see a querystring on an image request, it’s usually there to act as a “cache buster” so the browser won’t hang on to an outdated version of the original file. I’m not sure why it’s being used in the Action, maybe Tim could weigh in on that choice, but that’s the usual reason for doing this sort of thing. Just had another thought – could it be related to one of the dimensions of the image?
Walter
On Apr 15, 2012, at 10:04 PM, Kim Kohen wrote:
I have a quick question regarding showcase galleries.
In the main HTML file the references to images are like this:
On 16/04/2012, at 10:33 PM, Walter Lee Davis wrote:
Any time you see a querystring on an image request, it’s usually there to act as a “cache buster” so the browser won’t hang on to an outdated version of the original file. I’m not sure why it’s being used in the Action, maybe Tim could weigh in on that choice, but that’s the usual reason for doing this sort of thing. Just had another thought – could it be related to one of the dimensions of the image?
I don’t think so as the width and height are declared later on.
Hi Walter,
I would need to clarify this but I suspect you are right and that the query string was added to prevent the browser (and Freeway’s own preview) from caching the image source.
I’ve done similar things with a recent version of the Externalize Action and used an MD5 hash of the file to create the query string.
You can see this in use on the Softpress site;
When the external file changes (in this case the index.css file) the hash will also change and should prevent the browser from loading a previously cached version of the file. Obviously if the hash remains the same (and the css file isn’t updated) then the browser happily loads the cached file.
If anyone is interested I can pull the function out and roll this into a library that you can add to other Actions.
Regards,
Tim.
On 16 Apr 2012, at 13:33, Walter Lee Davis wrote:
I’m not sure why it’s being used in the Action, maybe Tim could weigh in on that choice, but that’s the usual reason for doing this sort of thing.