3 ms·
Fixing layout in javascript has negative performance implications. Either you embed the js in the html, in which case every page is larger than necessary, or yo
by btmorex 16y ago
Fixing layout in javascript has negative performance implications. Either you embed the js in the html, in which case every page is larger than necessary, or you put it in a separate file, in which case your layout can't be rendered correctly until another file is loaded.
I'm not sure what the author's point was exactly. There are tons of things that are easier to do with "classic" html or just plain hard to do with css alone. Even though we've been hearing ever since its invention that css is incredible, I'm still not convinced. It's certainly useful, but in so many ways limiting and annoying.
- wheels 16y ago> Either you embed the js in the html, in which case every page is larger than necessary, or you put it in a separate file Which is different from CSS how exactly? Text is small and most sane server configs are gziping it on top of that. We're literally talking about 500 bytes.
- btmorex 16y agoWell, you can't reasonably avoid external CSS, but you can reasonably avoid external JS. I still have tons of pages without external Javascript. I'm fairly sure I don't have a single one without external CSS. As for gzipping etc. it's the not the actual size that matters it's the latency + the fact that it's a new connection. TCP/IP connection takes a while and then (for larger files) you have to deal with slow start. This wouldn't be a huge deal if everyone supported pipelining, but they don't.