Should I download scripts from a CDN or bundle everything into one script

bundling

I am using jQuery, angular, bootstrap, along with some custom js files. Currently, I have everything bundled into one script. Since, jQuery, angular, and bootstrap are available via CDN, is it better to just grab them from the CDN or should I keep those bundled with my scripts?

Best Answer

My advice would be to bundle all of your own scripts together, and load common third party scripts from a CDN. It gives you the best of both worlds - your scripts download quickly, and third party scripts are likely loaded directly from the end user's cache.