Minimize CSS, JS, and HTML - Together

Minimizing JS and CSS is quite common. The benefits of minimizing JS are much higher than those observed with CSS, because with CSS you cannot rename elements, as well as for HTML. But what if all 3 were combined together so that the benefits of using shorter names could be added to CSS and HTML? That is, instead of minimizing, not paying attention to the relationship between them, they could be saved and simplified. I suppose that the implementation can be quite complicated, but if it were possible, do you think that this will provide a significant advantage over the traditional minifinal?

+6
javascript html css minify
source share
5 answers

I suppose implementation can be quite complicated, but if possible, do you think this provides a significant advantage over traditional minification?

Minimization matters, and it largely depends on the number of scattered text fragments. Yahoo YSlow and Google Page Speed โ€‹โ€‹both talk about all three and provide solutions such as saving the mini version from the inside.

So, it would be nice to minimize where there is room for it, and performance is critical.

+3
source share

This is probably not a significant benefit. If you gzip all of your web content, then you will get the benefits of compression without the added complexity of everything that minimizes. And you also compress all the content on your pages, which, I hope, a significant part of the volume of your page.

+6
source share

Please note that using GZIP solves many problems. gzipping response is effective if there is a lot of repeating text - for example, your css classes. So instead of using a sophisticated minimization tool, use gzip.

+3
source share

There are probably far fewer advantages than minimizing JS, as you definitely cannot change CSS style attribute names. In most cases, they take up more space in the CSS files. All you can do is reduce ID / class names and remove extra spaces. I would prefer an average saving of around 10% in terms of HTML / CSS.

Besides what Greg said.

+1
source share

This will be of interest.

-one
source share

All Articles