Sometimes I have issues while loading some ad scripts. If the external server is not responding, the whole page waits for the respond and stops loading. How can I tell those problem scripts to start executing after:
- The whole page is loaded.
- All other scripts are loaded.
Using
deferdoesn’t guarantee that it will defer both loading and running. You can control exact time when you want this script to start loading and executing by adding it to page dynamically by placing<script>with following contents after everything else you want to load and run: