The Need. The Need for Speed.

No one likes a website that loads slowly. Here's a running list of all my little tips and tricks to keep everything running speedily.

Tags: Performance

Back to Blogs

Rack Deflation / GZIP Compression

So if you're using a decently recent version of Rails, it comes with a built-in compressor. Simply add this to your application.rb and deploy:

config.middleware.insert_after ActionDispatch::Static, Rack::Deflater

According to Pingdom, this one change took my site from a 1.06s load time and a performance grade of 83 to a load time of 797ms and a performance grade of 85. However, it did apparently increase the page size from 856.8 kB to 860.9kB, which warrants a little more investigation, but faster is faster so I'm letting it slide for now.


Back to Blogs