I'm having a Logout page, which coded with intention show a big Picture and then clears cookies and implement Javascript window.close().

However as picture is big, it takes some time to load. So, before loading the image rest of script that clears cookies and window closing is implemented.

This way user never sees the image.

I want to delay executing rest of code after the image code, so image have enough time to be loaded.

If someone know a solution please let me know.

Best Regards.