Nice find!

I made a similar one a while back too:

https://gist.github.com/frankie-loves-jesus/d7eec0ebab0525e94256

Feedback would be much appreciated.

Frank


2014-08-09 15:58 GMT+02:00 Gabriel Sobrinho <[email protected]>:

> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rubyonrails-core.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to