If you’ve ever developed something in JavaScript and wanted to have control over it when it was launched in a remote location, Dynamic Script Tags (DST) are the perfect solution. As you’ll learn in this article, DSTs are dynamic because they are script tags added via the Document Object Model (DOM) that allow developers to point to remote JavaScript files. Although standard script tags allow access to remote JavaScript as well, DSTs provide a cleaner, more streamlined approach. This approach increases portability by streamlining setup so that anyone who implements your JavaScript component will be free from adding additional script tags that point to your server.
In this article, you’ll learn how to create a DST tag and append it to the head of the local file in order to update JavaScript code from a remote location. Let’s take a look at how to create a reusable method, which will create the DST for us by simply passing a fully qualified path to a JavaScript file.
Read the original article at Peachpit