Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've just received an email that contains a remotely hosted animated png. The png file is a countdown timer. Here is the URL:-

https://img.kickdyn.com/57/1MfiOGVFjvmaMMHd3VZv/imgancnt.png

Can someone please help me explain how this works? I would have expected that each time I load the file it would start playing fomr the same point, effectively resetting the countdown, but that seems not the be the case.

How does the PNG file know where to resume it's countdown from?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

The image is a GIF (MIME type image/gif), and not a PNG like the URL suggests. You can check this by inspecting the response:

Cache-Control:private
Connection:keep-alive
Content-Length:292122
Content-Type:image/gif
Date:Wed, 10 Jul 2013 15:42:25 GMT
Server:Microsoft-IIS/7.5
X-AspNet-Version:4.0.30319
X-Powered-By:ASP.NET

Since a server can of course generate a GIF image—or any response—on the fly, it's not rocket science to generate an animated image with the matching countdown time and render this to the client.

share|improve this answer
2  
The file in question includes 30 frames, so after 30 seconds the magic is over -- or the page where this image is embedded needs to reload it. –  mpy Jul 10 '13 at 15:50
    
Ah yes! I hadn't considered that it was dynamically generated each time. That must take a bit of a hit on the server. –  Rob Jul 10 '13 at 15:57

Just becuase it is named .png does not mean it is really png. that image is a regular animated gif. You can easily confirm that either by:

  • looking at the raw file itself and if you understand its structure, you'll plainly see it is gif.
  • looking in your browser at server's headers and see that it says Content-Type:image/gif.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.