What kind of reasoning should I do in order to choose a specific CDN to load Javascript & CSS libraries into my website development projects?
I see that there are some options (i.e. BootstrapCDN, cdnjs, unpkg, jsDelivr and possibly others) but I don't understand when sould I use one over the others.
As an example, examples in Bootstrap documentation show BootstrapCDN and jsDelivr, while aos
's docs use unpkg, and so on.
The first thing that comes into my mind is that there could be differences in how fast they are and how much they are used (so, if I use the one with the largest market share, I will be more likely to have my users already have the libraries in their browser's cache), but I'm not sure it this is just being nitpicky or if these reasonings are legitimate.
Also, once I pick a CDN to load a script, are there valid reasons to always use the same for other scripts as well?
I usually use npm to download scripts into my dev environment and pack them in a single bundle; but there are times when I want to keep one or more of those scripts non bundled (i.e. they are used on a single page and I don't want to load them everywhere); in this situation, using a CDN is probably better than loading them locally, hence my question.