الجمعة، 17 أغسطس 2012

How to get a .gif file to replay

Earlier this week two readers solved for me a problem that has bugged me for years.  When I'm surfing the web looking for material for the blog, I go to sets of bookmark folders that each have 12 links, and open all twelve at once ("tabbed browsing").

It's works fine for browsing, but sometimes when I get to one of the tabs I discover that a .gif on the page has already completed playing, and all I can see is the final image.  Refreshing the page or reloading the url never restarted the little video.

When I posted about the evolution of Olympics gymnastics, reader Danack offered this link in his comment:
http://www.basereality.com/proxy/1134/Olympic-vaults-compared.gif
I watched the gif, and it was interesting, but it wouldn't replay for me.   So I asked how to do it, and he replied:
There's probably a better way, but on most webservers you can append any query to force an image to be reloaded, by adding a '?' and then 'something=something'

e.g. http://www.basereality.com/proxy/1134/Olympic-vaults-compared.gif?lol=wut

If you're using firefox, it may be a setting was altered:
http://kb.mozillazine.org/Animated_images
That worked (it also sometimes works just by adding a "?").  And then later in the day Matthias directed me to a Lifehacker article, which suggested that using Shift+refresh would solve the problem.
Caching is almost always a good thing, but occasionally something can go wrong in the cache...  The web site won't work the way it's supposed to. The same sort of problems also occur with stylesheets (ever seen a web site that looks like all the nice sparkle went away and all you can see is unstyled text?) and images.

Sure, you could clear your entire browser cache (in Firefox: Tools -> Clear Recent History), restart your browser, or go nuts and restart your computer, but most of the time that's overkill. Any of those methods could be worth trying eventually, but before you try anything more drastic or time-consuming just hold your Shift key and click the Refresh button in your browser (or press Ctrl+Shift+R [Win]/Ctrl+F5 [Win]/Cmd+Shift+R [Mac]; the keyboard shortcut doesn't work on Safari). While a normal page refresh (whether you click the refresh button or use the F5/Ctrl+R/Cmd+R shortcuts) still uses those cached files rather than re-downloading them, the Shift+Refresh clears the cache for the files in that page so that you're sure to be running the latest and greatest version of what that web site's serving.
You learn something every day.   A hat tip to both readers.

ليست هناك تعليقات:

إرسال تعليق