4 ms·
> 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 exac
by wheels 17y 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 17y 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.