You can use
loadOnReady attribute on
apex:includeScript - meaning, that library will load only after DOM is constructed.
script you dont have such capability.
Multiple references to the same script are de-duplicated, making this component safe to use inside an iteration component. This might occur if, for example, you use an inside a custom component, and then use that component inside an iteration.
Interesting read on script tag:
- If async is present: The script is executed asynchronously with the
rest of the page (the script will be executed while the page
continues the parsing)
- If async is not present and defer is present: The script is executed
when the page has finished parsing
- If neither async or defer is present: The script is fetched and
executed immediately, before the browser continues parsing the page