
David A. Desrosiers wrote:
This isn't a boolean decision and there are reasons for and against inline styles vs. external styles. If you have an extremely heavy hit site (like I do), inline styles makes sense... _except_ when your stylesheet itself is overly large (hundreds of lines or more).
The balance has to be consired: Is it worth it to incur another socket connection and round trip from the client (more server hits to retrieve resources) or is it better to have a larger byte-per-hit (but less socket connections) per-client?
If connections are your concern why dont you use keep-alive connections on your site? Modern UAs and webservers can download an HTML page with CSS and all images in one connection: $ wget -S --mirror http://www.gutenberg.org/files/15701/15701-h/15701-h.htm --00:23:03-- http://www.gutenberg.org/files/15701/15701-h/15701-h.htm => `www.gutenberg.org/files/15701/15701-h/15701-h.htm' Resolving www.gutenberg.org... 152.2.210.81 Connecting to www.gutenberg.org[152.2.210.81]:80... connected. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Tue, 26 Apr 2005 22:23:04 GMT 3 Server: Apache/1.3.33 (Unix) PHP/4.3.10 4 Last-Modified: Sun, 24 Apr 2005 19:59:32 GMT 5 ETag: "5de5d6-f4c14-426bfaa4" 6 Accept-Ranges: bytes 7 Content-Length: 1002516 8 Keep-Alive: timeout=5, max=20 9 Connection: Keep-Alive 10 Content-Type: text/html --00:23:28-- http://www.gutenberg.org/robots.txt => `www.gutenberg.org/robots.txt' Reusing connection to www.gutenberg.org:80. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Tue, 26 Apr 2005 22:23:28 GMT 3 Server: Apache/1.3.33 (Unix) PHP/4.3.10 4 Last-Modified: Tue, 19 Apr 2005 12:46:20 GMT 5 ETag: "3e587-161-4264fd9c" 6 Accept-Ranges: bytes 7 Content-Length: 353 8 Keep-Alive: timeout=5, max=19 9 Connection: Keep-Alive 10 Content-Type: text/plain --00:23:28-- http://www.gutenberg.org/files/15701/15701-h/images/001.png => `www.gutenberg.org/files/15701/15701-h/images/001.png' Reusing connection to www.gutenberg.org:80. HTTP request sent, awaiting response... 1 HTTP/1.1 200 OK 2 Date: Tue, 26 Apr 2005 22:23:28 GMT 3 Server: Apache/1.3.33 (Unix) PHP/4.3.10 4 Cache-Control: max-age=86400 5 Expires: Wed, 27 Apr 2005 22:23:28 GMT 6 Last-Modified: Sun, 24 Apr 2005 19:59:32 GMT 7 ETag: "5de5d8-3575-426bfaa4" 8 Accept-Ranges: bytes 9 Content-Length: 13685 10 Keep-Alive: timeout=5, max=18 11 Connection: Keep-Alive 12 Content-Type: image/png -- Marcello Perathoner webmaster@gutenberg.org