24 February 2014 10 comments Web development
For some time now, I've been running an experiment
where I analyze how many different domains any website depends on. For example, you might have Google Analytics on your site (that's
www.google-analytics.com) and you might have a Facebook Like button (that's
s-static.ak.facebook.com) and you might serve your images from a CDN (that's
d1ac1bzf3lrf3c.cloudfront.net). That there is 3-4 distinct domains.
Independent of how many requests come from each domain, I wanted to measure how many distinct domains a website depends on so I wrote a script and started collecting random URLs across the web. Most of the time, to get a sample of different URLs I would take the RSS feed on Digg.com and the RSS feed on Hacker News on a periodic basis.
Take this page on The Toast for example, it depends on 143 different domains. Loading it causes your browser to make 391 requests, download 4.8Mb and takes 29 seconds (in total, not necessarily till you can start reading it). What were they thinking!?!
I think what this means is that website makers will probably continue to make websites like this. What we, as web software engineers, can not tell people it's a bad idea but instead to try to do something about it. It's quite far from my expertise but clearly if you want to make the Internet faster, DNS would be an area to focus on.
Test it out for yourself here: Number of Domains