I have this URL which needs to be loaded after the page has been loaded. I am trying to load the URL via Javascript like this:
<script type="text/javascript" src="//www.adtol.com/native/1/1/0/1"></script>
But, whenever I add async to this script doesn't load.
<script async type="text/javascript" src="//www.adtol.com/native/1/1/0/1"></script>
The src doesn't actually load the js file, it fetches data from server.
What can I do to load the URL asynchrounously via Javascript?
You can visit the src URL for better idea.
async? If that's the case, that's what async itself means i-e. it won't wait to load before your custom script is loaded.asyncis supported by all major browsers (even IE11 -- actually, I think Microsoft createdasync). What do you mean by "doesn't load"? You get an error? You see nothing in the Network panel? I find it extremely unlikely that it just doesn't load.srcis not actually a .js file, it is URLsrcs are URLs. But your//www.adtol.com/native/1/1/0/1returns JavaScript code, right? That's what yourscripttag says it does.