cobalt.rs icon indicating copy to clipboard operation
cobalt.rs copied to clipboard

HTML compression

Open flosse opened this issue 8 years ago • 5 comments

It would be great if there is a option to compress the HTML output. Does s.o. know how to achieve this with a minimal effort?

flosse avatar May 09 '16 18:05 flosse

@flosse Are you talking about minimizing the html,css,js etc?

LucioFranco avatar May 09 '16 18:05 LucioFranco

Are you talking about minimizing the html,css,js etc?

exactly!

flosse avatar May 09 '16 18:05 flosse

I don't think there is a good way to do it in rust right now. There are a few CSSParser libraries and HTML parser libraries but that would be a lot of work. What I might suggest is using something like gulp on travis when the site is deployed. Gulp can minimize everything very easily.

LucioFranco avatar May 09 '16 19:05 LucioFranco

Unless you're a very high traffic site I would think that compressing the actual HTML will not have a big impact. We can still leave this open.

johannhof avatar May 10 '16 04:05 johannhof

Unless you're a very high traffic site I would think that compressing the actual HTML will not have a big impact.

You're totally right but besides the actual compression I was thinking about removing comments.

flosse avatar May 12 '16 22:05 flosse