qxxueq
Last Updated: February 25, 2016
·
6.653K
· runeroniek
01b3ca0b3c0463d351679c5a440fb815

Enable GZIP support on Heroku

So, I was working in a project with about 2MB of assets being loaded everytime without a good cache and this, my good friend, isn't cool. I was almost writing a Rack Middleware to handle this, when I found the heroku-deflater gem.

So, it's simple. Add this to your gemfile:

group :production do
   gem 'heroku-deflater'
end 

This will gzip every asset (except images) and (really) improve your application assets' load time.

Before:

Picture

After:

Picture

Hope you liked it!

Link to heroku-deflater repo here.

Say Thanks
Respond

2 Responses
Add your response

21172
B1829aa74efccf2a6bf57e87ad6b9d13

Cool. What Analytics tool are you using there?

over 1 year ago ·
24669
Y

Does it work with Sinatra?

over 1 year ago ·