4 ms·
Separate domains for CSS and images files are primarily intended to overcome certain (old?) browsers' limitation on the number of concurrent connections to a si
by paulsutter 12y ago
Separate domains for CSS and images files are primarily intended to overcome certain (old?) browsers' limitation on the number of concurrent connections to a single domain [1][2]. Cookieless domains can only help you if you have supermassive cookies. Keep those to a special subdomain, if you really need to have them. But you probably don't.
There is no one rule of thumb for performance. Generally, inline everything that's small enough to inline. If it's big enough such that caching a separate file will help you on subsequent page loads, then put it in a separate file.
Test and measure. If you can't measure the difference, it doesn't matter. If you don't measure the difference, the rule you are following probably isn't helping you.
[1] http://www.stevesouders.com/blog/2013/09/05/domain-sharding-revisited/ http://www.stevesouders.com/blog/2013/09/05/domain-sharding-...
[2] http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/ http://www.stevesouders.com/blog/2008/03/20/roundup-on-paral...
- gry 12y ago> Test and measure. If you can't measure the difference, it doesn't matter. If you don't measure the difference, the rule you are following probably isn't helping you. /Yes/.
- sgustard 12y agoThat's a sad state of affairs for our industry, though. It's like every structural engineer being told to measure which is stronger, iron or steel. How about some basic shared knowledge we can all trust and build on?
- ChuckMcM 12y agoThere may yet come a day when all steel is sold by weight, manufactured in unnamed factories at unknown chemical compositions such that the only way to know if a piece of steel you have will carry the weight being asked of it, is to use a sample of it in a test fixture. Unfortunately that day is already today on the Internet, where browsers have unknown design decisions made of unknown reasoning across networks that were optimized for unknown requirements.
- iopq 12y agoIt's more like what's cheaper, diesel or gasoline? Well, it depends on your mileage and the prices...
- forgottenpass 12y agoHow about some basic shared knowledge we can all trust and build on? We have decades of it, it's so trusted that you're forgetting it even exists. What we don't have are convenient answers for questions at the edge of predictability involving dozens of constantly-moving variables.
- debacle 12y agoYou can get italics using *.
- rimantas 12y agoMost modern browsers are limited to 6 connections per hostname[0] (IE is an exception), and usually there are many more than 6 images/assets, so separate domains still make sense. [0] http://www.browserscope.org/?category=network http://www.browserscope.org/?category=network
- justincormack 12y agoMeasure it. Not necessarily. Massively parallel TCP is not great. In lining is much better for tiny images.