JavaScript on deviantART: DWait and Dependencies
dt.deviantart.com
dt.deviantart.com
You don't want to group too much because you risk downloading code you don't need, but you don't want to split too much because you need to keep HTTP requests low. Proper optimization requires intelligent grouping of related code to create a balance between these two ideals, allowing the browser to cache commonly used resources so subsequent page loads are fast.
Their blog page has 6 external JavaScript files and 4 external stylesheets. Those numbers are pretty reasonable given the scope of their site.
CSS doesn't get anywhere near as much benefit from being minified as JS does. There's much less scope for transformation of the code to make it smaller, so if you're serving your CSS gzipped (which we do) then the difference is minimal at best.
However, I disagree about the low benefit of minifying gzipped CSS. I thought the same thing too until I ran some tests. For example:
34K v6core.css.gz
27K v6core.min.css.gz
I ran your core CSS file through YUI compressor and then gzip. 7k of savings, over 20%, definitely seems worth it.Look at their home page, for example. It uses just one stylesheet (v6core.css). That same file is also used on their blog, so my browser already has it cached. Perfect!
None of those stylesheets are less than 45K, so the savings they get from not needing to download them on every page outweighs the HTTP request hit they take by including them separately on more complex pages.
The second third talks about how JS/CSS dependency resolution is handled using metadata included in the files themselves.
Then it explains a client-side library used for enabling dependency behavior on the frontend, including dynamic loading of files as-needed.
Check out my post on the front page of HN just a couple days ago (before this was written) ;)
The exact same reference, but relating to Clojure.
http://copperthoughts.com/p/clojure-io-p1/
That's not to say I don't appreciate it, though :)