It is a simple shell script that I wrote to quickly compare the speed of two CDNs. After I wrote it I learned about the CDNperf website which may be more useful than this script in general.
What this script does, however, is tell you what are the numbers for your particular location in this given instant, which may be interesting to someone. Using this script I have seen very different results than what is shown on CDNperf. For example Microsoft CDN that according to CDNperf is the fastest, is usually the slowest one for me (tested from Warsaw, Poland) which is an important information when choosing the right CDN for local demographics.
wget https://raw.githubusercontent.com/rsp/ajax-cdn-speed-test/master/ajax-cdn-speed-test chmod a+x ajax-cdn-speed-test
How it works
It downloads a minified version of jQuery 2.1.3 over HTTP and HTTPS and displays download time. It also prints the average ping round-trip time for the host. It tests the following CDNs:
- Google Hosted Libraries
- Microsoft Ajax Content Delivery Network
- jQuery CDN
- Bootstrap CDN
- jsDelivr (multi-CDN infrastructure)
- cdnjs powered by CloudFlare
This program is open source / free software. See: LICENSE for details.
The latest version is available on GitHub: