And maybe easier on the server side to include the script directly in the html? Each time you refresh the page, the script will restart. Usually this extra traffic, but in your case it will not be superfluous because you want to update the script constantly.