It depends on your purpose - Google's CDN is likely faster than what you have, but hosting it yourself makes sense if you intend on minifying all of your script files into one large minified script file.
include jquery.js / bootstrap.js from own domain or from the original?
-
15-03-2022 - |
Question
i'm confused whether to include jquery.js or bootstrap.js files from my domain or to link the files directly to the download page of the providers. what is the most common practise? i want to load my sites quickly, thus i have 2 options:
- hoping my users already have the
originaldomain.com/jquery.js
cached (but if not loading from the original site may be longer than from my own megaspeed domain) - include them at
mydomain.com/jquery.js
and every user must donwload it
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow