Msg#: 4523903 posted 7:38 pm on Nov 30, 2012 (gmt 0)
Order of statements in CSS is only significant when one rule potentially overwrites another. So within any given element, go from most general to most specific.
The body doesn't have to come first. But your page is not going to start rendering before the whole CSS has loaded, so it only makes sense to put things where you can find them later.
There are page-speed-testing utilities that show in excruciating detail what gets loaded when, and how long it takes.
:: shuffling papers ::
Here's one [webpagetest.org] that I've met recently. (The next passing moderator may swap out this link for something higher up the Authorized List. I found it on web-pages-that-you-know-what dot com.)
Msg#: 4523903 posted 8:22 pm on Nov 30, 2012 (gmt 0)
Whether or not it actually makes a difference I don't know. But in my obsessive compulsive quest for speed and efficiency I always list the css in the order that they appear on the page. And I take it a step further by ordering the attribute names in alphabetical order. I'm not sure why I do it, really! But recursion comes to mind, I just wouldn't know how to test for it.
It all works for me. Last site launched now has my all-encompassing knowledge of what constitutes good design principles and it is (according to GWT) loading in an average of 123 thousands of a sec, with lowest at 82. The other sites on the same server are around 300 without having been fussed about as much.
Yes, multiple downloads occur at one time but the number is restricted to 4 or 6 at once.
I think that standard has been bumped up in most browsers. I think it's currently at 12 in FireFox, not sure about IE or others. It used to be 2 way back. But even then, and now, I assign my browsers a higher value.
In IE you can add a new registry key call MaxConnectionsPerServer and bump the default up to say, oh, 25 isn't being too demanding (depending on your ISP connection type). In FireFox you can edit it by typing about:config in address bar then search for network.http.max-connections-per-server -- bump it from default of 12(?) to something like 25.
Don't over do it or you risk suffering the wrath of webmasters by hogging the queue, they might ban you!