What is the correct term for using this syntax for including external javascript file:
<script src="script.js"></script>
Is the script.js included? Is it executed? Is it linked? Is it called? Did I just run the file?
What is the correct term for using this syntax for including external javascript file:
<script src="script.js"></script>
Is the script.js included? Is it executed? Is it linked? Is it called? Did I just run the file?
When the script tag is encountered, a request is sent to the server to provide the script.
In the meantime, modern browsers will continue to scan the document for additional content to download. However, the rendering is still blocked until that script is done.
After the script has been downloaded it is executed before any subsequent1 script that may or may not have finished downloading before him2. Note that there are exceptions to this rule (read about async loading of scripts).
Now, to answer your question: I usually use the term include as in "It is recommended that we include our js files at the bottom of the page since the page rendering will be blocked until they are downloaded and executed". Some people call it script loading. For me, it doesn't really matter as long as you understand the process.
Read more here.
1 a script included after him in the page structure
2 this can happen since the modern browsers download scripts in parallel