4 ms·
I think most of the HTML you get from large websites is gzipped. Gzip is pretty good at compressing things like three nested div tags. So I think if you tried t
by oconnor663 7y ago
I think most of the HTML you get from large websites is gzipped. Gzip is pretty good at compressing things like three nested div tags. So I think if you tried to build this sort of optimizer, you'd find that a big chunk of the plaintext savings gets lost through reduced compression efficiency. But who knows how much? Maybe it could help in some cases. (Though then of course you'd have to figure out how not to break CSS selectors.)
- beatgammit 7y agoYeah, CSS selectors in JavaScript would probably be the main issue here, and figuring out if a selector path is used is a very difficult problem to solve. I really wish we could just collectively move away from stupidly complex webpages and get back to JavaScript as optional for most pages. Once you eliminate JavaScript as a required component, you tend to design things more simply and page loads become lighter and faster. IMO, JavaScript should only be required for applications (maps, games, perhaps video playback), with everything else using primarily HTML and CSS. That would kind of put me out of a job though, but I think it would make the internet better, and it would certainly help improve efforts to improve accessibility.