diff options
author | Andreas Gohr <andi@splitbrain.org> | 2016-11-26 14:29:40 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2016-11-26 14:29:40 +0100 |
commit | 61537d473082f0edeb704a391f412ea4040b3226 (patch) | |
tree | 55cb23d4764f42dfb50f690ecc81490cb2cadb96 /lib/scripts/jquery/jquery.min.js | |
parent | 5928c8e71080077bf8d9ed0cbfe33ffa8ca7b904 (diff) | |
download | dokuwiki-61537d473082f0edeb704a391f412ea4040b3226.tar.gz dokuwiki-61537d473082f0edeb704a391f412ea4040b3226.zip |
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.
Diffstat (limited to 'lib/scripts/jquery/jquery.min.js')
0 files changed, 0 insertions, 0 deletions