News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jozef Chuťka's Blog:
Image Caching With PHP
June 04, 2010 @ 11:33:44

Jozef Chutka was working on a Flash-based application and, in trying to optimize it, figured that he'd set up an image caching system to keep the app from having to grab the images each time. The result is shared in this post - a simple tool that relies on HTTP headers to notify the client if anything's changed.

I can not hold all of those [requests] within flash player cache because some of them may change, and I also want shortest possible respond times and client-server traffic reduction as well as server side computing reduction. That's where browser caching comes into the scene. I have experimented a bit with all possible http headers to understand each browser specifics and I came with a solution.

He includes a snippet of code that shows how it would check the current image and send the correct headers as to whether or not it needs to be updated from the cached version the application has. This also keeps you from having random parameters in your requests because the server always assures the content is fresh.

0 comments voice your opinion now!
caching image flash http header tutorial


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: The Joy of Regular Expressions [4]

HowTo Forge: How To Harden PHP5 With Suhosin On Fedora 7

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 11)

FuzzyOpinions Blog: Tutorial: improving security with a PHP Captcha

DealTaker Blog: PHP & MongoDB Sitting in a Tree: Part 1


Community Events

Don't see your event here?
Let us know!


introduction framework extension opinion conference series php7 laravel5 example release podcast unittest library api interview laravel language voicesoftheelephpant version community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework