JavaScript CDNs by the numbers
CDNs are an excellent way to speed up the loading of common JavaScript libraries for your website:
- because it's a different domain, your browser can load the files in parallel to your other resources
- CDNs use a geo location near you, which should reduce latency
- CDNs servers may be a bit faster than your shared hosting server
- Your browser might have cached the library already so no request is needed at all
Inspired by a discussion on a pull request for DokuWiki, I was curious about the popularity of different free CDN providers. So I decided to do some research and ran a little web crawler….
Two weeks later my script is finally done checking 16 million domains and I'm happy to present the results in the following info graphic:
If you want to play with the data yourself, here's an sqlite database for you: cdn.sqlite3.gz (113MB)