Sometimes you need to dynamically add a script tag to HTML. But there are some gotchas that might get you if you don't know to look out for them.
You might ask, why add scripts dynamically at all? Well, here's two reasons:
- When you don't know what to load until runtime.
- When you want to load scripts without blocking the page load.
I recently …
Read More