durehed / htmlcompressor

Automatically exported from code.google.com/p/htmlcompressor
Apache License 2.0
0 stars 0 forks source link

Shrinking classes and IDs #46

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It seems Gmail does it and I think it's worth the effort (eg. #foo -> #a, #bar 
-> #b, .baz -> .a). I do know though, that it might be difficult to implement.

Original issue reported on code.google.com by abom...@gmail.com on 17 Jul 2011 at 12:57

GoogleCodeExporter commented 8 years ago
Some of those ids and classes are likely to be used in javascript, so it would 
require some configuration saying which classes to skip or something. It might 
make sense for google with its traffic to go for such extremes, but for regular 
sites it probably isn't worth the effort.

Besides I did some testing some time ago to see how much this would save - the 
result wasn't impressive, it only decreased the html size by about 10%.

Lets leave this issue open for now, if more people think this is something they 
want to do on their sites, I will look more closer into it.

Thanks.

Original comment by serg472@gmail.com on 17 Jul 2011 at 3:30

GoogleCodeExporter commented 8 years ago
I thought about this feature before, and none of the html compressors I found 
did that, so I just forget about it.

10% is pretty big saving IMHO, which means if ten pages use HC , then users can 
avoid to download a page all together.

But the implementation is not easy I guess, especially designing the 
configuration to denote strings contain classses and IDs in js.

Anyway, +1.

Original comment by gra...@gmail.com on 8 Dec 2011 at 9:15