I think what you need is a middleware which compresses the body, like this one: https://github.com/paolochiodi/htmlcompressor
On Friday, August 8, 2014 9:05:23 PM UTC-3, Frank Tellefsen wrote: > > Based on https://news.ycombinator.com/item?id=8098317 (HTML minifier > revisited) and specifically: > > Google minifies HTML on basically all its properties. It's probably about >> a 50% savings in bytes, which translates to (on my Comcast connection) >> about 250ms in network latency saved. Multiply out by rough estimates on >> queries/day and it saves a human lifetime every 2 days. >> >> Repeated experiments - by Google, Amazon, and many smaller websites - >> have shown that lower latency directly translates to higher conversion >> rates, so I wouldn't be surprised if this results in billions of dollars of >> extra commerce, and even a small website would get noticeably higher >> revenue if they did this. Google also ranks faster websites higher, and so >> you get an SEO benefit as well. >> > > Is there a way to make Rails render partials on the same line in the DOM? > I'd like to combine this with a Rake task that copies views to a temp > folder, minifies them, and serves them instead of the real views. That way > I don't have to minify HTML with regexes (or at least there'd be less HTML > to minify) on each page load. > > Thinking this would do well together with gzip compression. > > What do you guys think? > > Thanks, > Frank > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.