I'm trying to do a process like this:
- Generate a temporary image using PHP
- Generate/Send HTML to browser, for displaying some misc info and display the generated image
flush();
- Wait (
sleep();
) 10 seconds (so browser has some time to load the image) - Delete the temporary image from server
It in fact "almost" works... only problem is that browser keeps on its "loading" state for the other 10 seconds I gave the script to delete the image... like if needs some "signal" to effectively "acknowledge" the page load as "complete". My question is, how to properly do this? :P