The smallest Javascript libraries on the internet ...

Popular Javascript libraries such as jQuery grew tremendously over the years.
To reduce bandwidth requirements, these libraries are usually minified and GZIP compressed.
Surprisingly, most Content Delivery Networks (CDNs) give you a quite bad level of GZIP compression.

Google's Zopfli (open source) is currently the best GZIP compressor and produces the smallest files.
It produces files fully compatible to the DEFLATE algorithm (used by GZIP) but in order to find even better compression
it is based on a random walk (trial-'n'-error). I run a brute-force search to find optimal Zopfli parameters.

That means: when decompressed by the browser, my files are 100% identical to the original minified versions.
There is no difference to the developer, to the administrator or to the end-user:
except my files are smaller and therefore load a tiny bit faster.

size(mine) < size(original)   but   content(mine) = content(original)

Everything you find on the website can be used in in non-commercial as well as commercial projects without any obligations
However, if you are a super-kind person, then please send me a short mail. Or a postcard. Or both.

Libraries

My server analyzed these already minified and zipped projects and compressed them even further:
Project Author's Website Latest Version Best CDN's Size My Best Version Improvement Details Older Versions
AngularJS https://angularjs.org 1.8.2 62297 bytes 59806 bytes -2491 bytes (4.00%) in-depth info and 146 older versions
BackboneJS https://backbonejs.org 1.4.1 8020 bytes 7776 bytes -244 bytes (3.04%) in-depth info and 25 older versions
Bootstrap https://getbootstrap.com 5.2.3 16097 bytes 15514 bytes -583 bytes (3.62%) in-depth info and 42 older versions
D3 https://d3js.org 6.7.0 89314 bytes 84040 bytes -5274 bytes (5.91%) in-depth info and 152 older versions
Dojo https://dojotoolkit.org 1.17.3 (n/a) 53656 bytes (n/a) in-depth info and 141 older versions
Ember https://emberjs.com 3.0.0 (n/a) 113676 bytes (n/a) in-depth info and 107 older versions
jQuery https://jquery.com 3.6.1 (n/a) 29900 bytes (n/a) in-depth info and 80 older versions
Knockout https://knockoutjs.com 3.5.1 29074 bytes 24254 bytes -4820 bytes (16.58%) in-depth info and 18 older versions
lodash https://lodash.com 4.17.21 26035 bytes 24738 bytes -1297 bytes (4.98%) in-depth info and 52 older versions
React https://reactjs.org 18.2.0 4269 bytes 4179 bytes -90 bytes (2.11%) in-depth info and 76 older versions
Socket.IO https://socket.io 4.5.4 13101 bytes 12599 bytes -502 bytes (3.83%) in-depth info and 67 older versions
ThreeJS https://threejs.org 148 152872 bytes 146430 bytes -6442 bytes (4.21%) in-depth info and 98 older versions
UnderscoreJS https://underscorejs.org 1.13.6 7526 bytes 7302 bytes -224 bytes (2.98%) in-depth info and 72 older versions
Vue https://vuejs.org 2.6.14 34328 bytes 32920 bytes -1408 bytes (4.10%) in-depth info and 105 older versions

On average, my files are 5.57% smaller than the smallest files you find on these major public content delivery networks:
Baidu, Boot, cdnjs, fastcdn, Google, jsdelivr, Microsoft, Sina, unpkg and/or Yandex.

Not a single file from these CDNs is smaller or has the same size as my compressed files. Take a look at some statistics.

How To Use It

Select your desired library from the table above, for example jQuery 3.6.1, and either:
  1. download the smallest file and store it on your server

  2. hotlink to my server's copy
As mentioned before, after decompression my files are 100% identical to their original version.
The only difference is I spent much more time finding an (almost) optimal compression.

Fallback Solution

No matter which CDN you use, it's always a good idea to have a fallback in case the CDN is unreachable or - even worse - delisted your specific library.
All you have to do is to keep a copy of that library on your local server and add the following Javascript code:
<!-- try to download from CDN -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- if failed, switch to local copy -->
<script>window.jQuery || document.write('<script src="local_server_path/jquery.min.js">\\x3C/script>')</script>

Please be aware that window.jQuery (last line) is specific to jQuery, for other libraries you have to use their dedicated main Javascript object:
Library Load Local Fallback
AngularJS <script>window.angular               || document.write('<script src="local_server_path/angular.min.js">\x3C/script>')</script>
BackboneJS <script>window.Backbone              || document.write('<script src="local_server_path/backbone.min.js">\x3C/script>')</script>
Bootstrap <script>$.fn.modal                   || document.write('<script src="local_server_path/bootstrap.min.js">\x3C/script>')</script>
D3 <script>window.d3                    || document.write('<script src="local_server_path/d3.min.js">\x3C/script>')</script>
Dojo <script>typeof(dojo) !== "undefined" || document.write('<script src="local_server_path/dojo.min.js">\x3C/script>')</script>
Ember <script>window.Ember                 || document.write('<script src="local_server_path/ember.min.js">\x3C/script>')</script>
jQuery <script>window.jQuery                || document.write('<script src="local_server_path/jquery.min.js">\x3C/script>')</script>
Knockout <script>window.ko                    || document.write('<script src="local_server_path/knockout.min.js">\x3C/script>')</script>
lodash <script>window._                     || document.write('<script src="local_server_path/lodash.min.js">\x3C/script>')</script>
React <script>window.React                 || document.write('<script src="local_server_path/react.min.js">\x3C/script>')</script>
ThreeJS <script>window.THREE                 || document.write('<script src="local_server_path/three.min.js">\x3C/script>')</script>
UnderscoreJS <script>window._                     || document.write('<script src="local_server_path/underscore.min.js">\x3C/script>')</script>

You can try another CDN instead of falling back to your local server, too.

Info

I created this website as a hobby project because every time a byte is wasted, a kitten cries. Seriously ;-)

By the way: if you run a small website it's totally fine to hotlink to the compressed files on my server.
However, high-traffic websites should copy my files to their own server.
And in the best of all worlds, major CDNs would replace their (too) large versions ... well, I'm just dreaming.
Notes: pigz is a fast open source multi-threaded implementation of gzip written by one of the original authors of gzip.
However, when using compression level 11, pigz actually switches to the slower Zopfli algorithm and isn't multi-threaded anymore.
KrzyMOD's extensions to Zopfli offer the highest level of configuration and is therefore used for my brute-force search.
Ken Silverman wrote the closed-source KZIP compression program and Jonathon Fowler ported it to Linux.
Defluff was created by Joachim Henke; DeflOpt is a tool by Ben Jos Walbeehm.

website made by Stephan Brumme in 2015 and still improving in 2024.
all timestamps are displayed in central european time. see my changelog.
no flash, not even images or external css files - and everything squeezed into a single html file.
which was handsomely compressed before releasing it into the wild internet - obviously.

please visit my homepage and my blog, too.
email: minime (at) stephan-brumme.com

All trademarks are property of their respective owners. You know, the boring legal stuff.