| #
61537d47 |
| 26-Nov-2016 |
Andreas Gohr <andi@splitbrain.org> |
split off jquery from other JS and add CDN option #1766
jQuery (and UI and Migrate) are now loaded separately from the rest of the JavaScript. This adds at least one HTTP request more but has some a
split off jquery from other JS and add CDN option #1766
jQuery (and UI and Migrate) are now loaded separately from the rest of the JavaScript. This adds at least one HTTP request more but has some advantages:
* browsers can cache it independently * the cache is only invalidated when versions update * we do not apply any transformations (replacements, minimizing, etc) on this code anymore which makes our dispatcher faster for the other JS * browsers seem to load (not execut) both (jquery and other) parallel, which might increase download speed a bit
This split allowed for the introduction of a new config: jquerycdn. When enabled the 3 jquery files are loaded from jQueries CDN. This adds another two HTTP requests but:
* since it's another host those files do not apply to the 4 request per host limit and can be loaded (not executed) in paralell which might increase download speeds a bit * the CDN is distributed worldwide which means files are requested from the closest location, increasing the download speeds * since these files/CDN are very popular, chances are high that people already have them cached in their browsers, reducing the download time to 0 and effectiely halving the javascript needed to download
The option currently defaults to 'off', but I would argue 'on' would be the better default.
show more ...
|