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.