[vox-tech] when is an html image "sent"?

Ted Deppner ted at psyber.com
Fri Dec 16 08:53:00 PST 2005


On Fri, Dec 16, 2005 at 10:28:40AM -0500, Peter Jay Salzman wrote:
> is there some kind of technique I can use to make sure the image file gets
> deleted after it's shipped off to the client?

What Rod said is typically the best (generate it inline), except you'll
have somewhat higher CPU needs as each time a customer goes back or
reloads the page you'll generate another image.  Also, you have to think
about how you'll know what the key is you stuck in the image... the page
taking the FORM must correlate with the image you generated.

You could also add a simple cron cleanup using find and continue to use
your existing script, ala:

30 * * * *      find /my/image/dir -mmin +60 | xargs -r rm -f

Which will delete any files older than 60 minutes when it finds them.
xargs -r makes xargs not run rm unless there's something for it to do.
Some might consider this a kludge, but it's simple and straight forward.

-- 
Ted Deppner
http://www.deppner.us/


More information about the vox-tech mailing list