I'll explain my problem ...
I have php code that automatically creates a javascript file every two minutes (through cronjobs) in which there is a multidimensional array.
In my website I have a page that uses this javascript file and also there is a function that every minute deletes this file added in the tag head and adds it again.
In this way (I hope) to have an updated version of the js file every minute.
My doubt is:
Is it possible that the javascript file is added to the page when it does not exist or is not yet completed?
What can I do to avoid this?
I hope can you suggest me something and apologize for my english