CDN with Local Fall Back & Optimized Asset Loading
Created by: ckluis
Given bootstrap's popularity and the availability of CDN versions of Bootstrap.
Would it make sense for bootstrap to partner with a provider like cdnjs.com to use a CDN as a default and fallback to a local version for CSS/Javascript/Icon Fonts?
If the standard implementation had all of its assets served from:
//cdnjs.com/bootstrap
With proper caching it could literally make the web faster (at least the sites using bootstrap as a base).
I'm not a developer or I would attempt to create a solution like head.js specific to bootstrap for loading assets. While the code of bootstrap's base may be slightly larger / complicated - it has the potential for real speed impact for end users. If I was capable I would envision:
bs-load ( .css (//cdn-bootstrapminified,//cdn2-boostrapminified,//local-bootstrapminified) .css (//local-customfolder/) .js (//cdn, //cdn2, //local) .js (//local-customfolder/) )
Although not everyone would use a base structure this rigid - many people wouldn't bother to change it. Theming because easier because you change out the custom.css & custom.js.
The primary advantage is that you could build in optimized asset loading.