2 ms·
Aren't there page optimizers, that can factor html and css and make it smaller ? Another simple way to solve this would be to just "compile" a webpage, like pr
by jokoon 11y ago
Aren't there page optimizers, that can factor html and css and make it smaller ?
Another simple way to solve this would be to just "compile" a webpage, like pre-parsing the dom tree, and write this tree file into a binary file. That would remove the parsing stage, which take a lot of CPU cycles, and is the reason why most web services have their own smartphone app instead of a simple combination of html+js.
Of course, if mozilla does it and creates such format, no developer will use it and it will die, so again it's up to something bureaucratic like the IETF.
It boils down from the fact that markup language were not really meant for web applications.
We are in 2016, and there still isn't a well designed, versatile document format for the web. I have completely zero clue how a browser displays a webpage, while there seems to be a lot of opportunity to optimize things there by moving away from a text-centered solution. I don't understand why there is nothing on this, all that is required is saving the intermediate data a browser has just after parsing a html file. Computers are not designed to eat raw text every time.
- jordanlev 11y agoI think you've missed the point of the presentation. Optimization tricks such as these are fun for us nerds to work on but at the end of the day it's like adding another lane to a highway or deflating a tire on your jeep (to use 2 metaphors from the talk). Compilation of the dom won't reduce the size of images or JavaScript files. And lastly, the author makes a point towards the end that in addition to page size, there is also the notion that plain old HTML and CSS is something new people to the platform can easily learn from and work on themselves (mineceaft vs. call of duty was the author's analogy about this).
- jokoon 11y ago> Compilation of the dom won't reduce the size of images or JavaScript files. The problem is not so much about images or js, it's more about webapps generating fat html and so much css. As for javascript, to me it's not a good language choice for many reasons. It's being used extensively like a core language to build web applications, while it's just a scripting language. HTML was never meant to be used like this. To be honest I don't really understand the analogy.