Page load speed testing

D0f6db0264fa58232df736e3bc8b898b
Posted on

I decided to conduct some simple page load speed testing. I hope the following info might be of some value to some folks out there.

What did I want to measure?

  • Page load speed when JavaScript and CSS stylesheets are bundled Vs. when they are unbundled.
  • Page load speed while the page is being loaded while utilizing CloudFlare Vs. not utilizing CloudFlare.

Pages I set up to conduct my test:

  • /http2-test-with-unbundled-resources: Very simple page consisting of 80 unbundled CSS files and 80 unbundled JavaScript files. Each of these files are 120,000 bytes in size totaling 19,200,000 bytes.
  • /http2-test-with-bundled-resources: Very simple page consisting of 1 bundled CSS file and 1 bundled JavaScript file. Each of these files are 9,600,000 bytes in size totaling 19,200,000 bytes (120,000 x 80 = 9,600,000).

Conditions under which testing was completed.

  • Chrome was the browser of choice for testing.
  • I tested on OS X that has a hardwired Ethernet connection.
  • The connection speed was throttled to 4 Mbps using Chrome Developer Tools.
  • I disabled browser cache by having selected the "Disable cache" checkbox in Chrome Developer Tools.
  • When pages were loaded utilizing CloudFlare, they were loaded in HTTP/2 instead of HTTP/1.1.
  • When pages were loaded utilizing CloudFlare, there was some significant optimization happening thanks to its CDN infrastructure.

What were the results?

Conclusion & thoughts

  • CloudFlare significantly improved page load performance (1 - 2 seconds Vs. 38 seconds!!!)
  • When pages are loaded via CloudFlare, bundling of resources can drastically improve page load speed.
  • I wonder how my testing would be impacted if...:
    • In addition to CSS & JavaScript files, I were to include images.
    • I were to load less/more unbundled resources.
comments powered by Disqus
© 2020 Junho Park
This website is built on Ruby on Rails with Bootstrap and Sass. The blog is powered by Postmarkdown. The opinions expressed here are my own.