I have an AngularJS app, which I am looking to optimise for speed.
I am currently uglifying and concatenating all my bower_components which I require into a vendor.js
file.
I am currently uglifying and concatenating all my custom js into a scripts.js
file.
As such, when a user downloads a page, there are very few resources in the get request. (Presently 6 in total without image assets). The disadvantage is that I have two large-ish js documents to download - about half megabyte in total - The entire doc needs to be downloaded before any page rendering can be done.
My main concern is with the vendor.js
file. Is it better to use cdn provided, minified javascript files (approx 10 in total), or is it better to use my concatenated & uglified vendor.js?
The former would mean that the total resources would increase to 16 without image assets, however they would be served by different vendor provided CDN networks, allowing parallel downloading.