mardi 14 août 2018

assets.gzip V.S. Rack::Deflater

I am trying to implement compression on my app. How is it different to implement middleware config.middleware.use Rack::Deflater or config.middleware.insert_before ActionDispatch::Static, Rack::Deflater in config/application.rb compared to enabling config.assets.gzip = true in my config/environments/.rb ?

reference:

https://robots.thoughtbot.com/content-compression-with-rack-deflater#rails-3-and-4 https://guides.rubyonrails.org/asset_pipeline.html#serving-gzipped-version-of-assets

Aucun commentaire:

Enregistrer un commentaire