I was hoping to throw what I am trying to do out there to see if anyone could give me the best way of handling it. Basically, I have a custom pdf viewer that converts the desired page of the pdf to a jpeg on the server and then sends that image to the browser. The problem is I don't want these images hanging around. Can anyone think of a clever way to clean up the images rather than having a cron job delete them every 'X' minutes??

Member Avatar
fatihpiristine

add javascript code to your page which displays your images on body unonload to remove the picture.. then you will not have to delete every x minutes

Im not sure i understand completely. Are you saying have a javascript function wich executes on body unload which will output the image tag, and then how would i remove the picture???

Member Avatar
fatihpiristine

you will execute the java code on unload,

you assing the path and name of the picture to the javascript. it is simple. not so complicated

And I would just delete the image with php at the end of my function??

Member Avatar
fatihpiristine

yes, you know already what to do :)