2 ms·
To be pedantic, content size is not the only factor, the amount of work the browser needs to do to render your page, the amount of visual effects, etc also have
by Cthulhu_ 6y ago
To be pedantic, content size is not the only factor, the amount of work the browser needs to do to render your page, the amount of visual effects, etc also have an impact on the perceived speed of your webpage. https://js1k.com/2019-x/demo/4130 https://js1k.com/2019-x/demo/4130, the winner of last year's JS1K competition, has a total downloaded size of 10kB, but probably won't run well on low end devices.
- giantrobot 6y agoYou're right that size ≠ complexity. However there's a vast difference between a web page with some fancy CSS and some JavaScript demo scene project. You can have a very fancy looking page with a few KB of CSS that will render just fine on even low end modern devices. You'd have to go back almost a decade to find devices that would struggle on such non-demoscene-yet-fancy CSS. Layout engines in browsers are pretty efficient and a fancy looking page without a bunch of JavaScript churning in the background fucking with the DOM or making a bunch of requests is not that demanding. The CSS Zen Garden [0] did some fancy ass layouts with CSS 2 and launched in 2003 running on browsers and computers far shittier than today's low end phones and PCs. With CSS3's advancements like transforms, transparencies, and animations there's a lot of effects that can be done entirely in CSS that those old designs needed images to do. [0] https://github.com/mezzoblue/csszengarden.com https://github.com/mezzoblue/csszengarden.com