...and how do we calculate it?
Wasted space is the spaces, line-breaks and tab characters that web developers leave behind them like a trail of so many tiny stupid breadcrumbs.
CMS (content management system) users also leave a footprint of wasted space on websites as they WYSIWYG edit the web with interesting articles about Donald Trump's hair, or the latest monkey-cats, or cat-monkeys, or monkeys that look like cats.
In fact, a lot of the time that anyone creates any content for the web, they're pretty likely to leave a little bit of waste behind them.
<div>
<ul>
<li>Menu Option 1</li>
<li>Menu Option 2</li>
</ul>
<p>
<strong>This is the title</strong><br/>
<span>And here's some text to accompany this.</span>
</p>
</div>
- Menu Option 1
- Menu Option 2
This is the title
And here's some text to accompany this.
The code fragment above (Markup Example) should allow you to select text. As you drag in between the different elements you might notice that spaces, line breaks and tabs are also selected by your mouse (or finger).
You can see the result of this markup being rendered above (Markup Example). These 'non-printing' characters are wasted space. They're never going to be seen by any of the users of the websites that they're embedded within, and yet these characters, millions and billions of them, are transmitted across the internet each day alongside pictures of cats...
Well, with the worlds carbon footprint hurtling us towards a tipping point of catastrophic global consequence due to widespread abuse of the resources we use to fuel ourselves, we thought we could maybe do some good by highlighting just how much waste might be out there. Like switching a light bulb off in the kitchen will save a little.
We're going to need a few things first before we can go ahead and arrive at a figure for this.
HTTP Archive has some useful statistics which detail the average breakdown of traffic on the web. These statistics were taken from 15th December 2017.
From this source then, we get a value of 1.96% for HTML content.
html = 0.0196
Type | Amount | Percentage |
---|---|---|
Video | 832kB | 23.21% |
Other | 29kB | <1% |
Images | 1854kB | 52.12% |
HTML | 70kB | 1.96% |
Stylesheets | 98kB | 2.75% |
Scripts | 504kB | 14.16% |
Fonts | 119kB | 3.34% |
This was a difficult figure to arrive at since the internet isn't the only energy user. Also taking into account the fact that other mediums like television, and telephony also co-exist in some of the same energy infrastructure, alongside other types of usage, this gets complicated real quick.
Eventually, however, we settled on using the following sources for these figures:-
This paper, on Worldwide electricity consumption of communication networks, although from 2012, is useful in so far as it takes a macro view of consumption and makes a good attempt at detaching the different elements of usage.
According to our calculations, the total worldwide electricity consumption in communication networks will exceed 350 TWh in 2012
Extrapolating the 350 TWh value above, gives us around 500 TWh in 2018.
We've assumed a value of 350 TWh (Tera-Watt hours), after looking at the Ghent University white paper.
power_usage = 350,000,000,000,000
This Cisco site provides worldwide statistics derived from analytics data from their equipment. Global IP traffic by application category shows a graph where Web/Data is shown as ~18% of traffic. Internet Video and IP VOD would also be considered in our content type table above, so we've picked a value of 25% which should encompass all of the content types we described above - adjusting by eye a little...
web_data = 0.25
This value is an average of the 211716 sites that we've tested so far. Currently this value stands at around 11.06% wasted space.
space = 0.1106
Now that we've got our high level values, we can begin to construct a value for how much we're wasting.
wasted_power = power_usage × html × web_data × space
wasted_power = 350,000,000,000,000 × 0.0196 × 0.25 × 0.1106
wasted_power = 189,716,869,717 (Watt hours)
Well, we've derived a value for power wasted. Lets see what this would look like in terms of what it would take to generate this. We'll look at coal, since this is still one of the primary sources of power generation.
First we'll need to convert from POWER to ENERGY. So we're going to convert from Watt hours (Wh) to Joules (J).
The formula below describe the relationship between power and energy that we'll use as the basis for this calculation.
Power = Energy / time
1 Watt = 1 Joule per second
1 Watt hour = 1 × 60 seconds × 60 minutes
1 Watt hour = 3600 Joules
Converting the derived power value to energy gives us the following.
wasted_energy = wasted_power × 3600
wasted_energy = 189,716,869,716.98 (Wh) × 3600
wasted_energy = 682,980,730,981,125.75 (J)
Coal isn't hugely efficient as a generation medium. there's stacks of waste in converting it to usable power that we can then use to run our smoothie makers, plug in our electric cars, or any of the other modern conveniences that the western world enjoys.
The CIAB provides this useful paper on power generation from coal which provides a Sankey diagram describing typical electrical output of 39% for a typical coal fired boiler.
coal_efficiency = 0.39
We used the calculation available at Conversion Website to convert Tons of coal equivelant to joules
Energy(J) = Energy (TCE) × 29307600000
Which provides us with an amount of coal in tons. Note, we're also using the efficiency value here, so that we arrive at a figure that would include any loss from generation.
tons_of_coal = ( 682,980,730,981,126 / 29307600000 ) × ( 1 / 0.39 )
tons_of_coal = 59,754
Coal usage is fair enough. But how big is that big pile of coal. A more definitive example of how much energy we're talking about, might be in terms of how many of 'you' this waste would supply.
We looked at various pieces of US census and power consumption data to derive the values below:-
power_usage_per_capita = 10,766,000 / 2.53
power_usage_per_capita = 4,255,335.97 (Wh)
Using this figure we can now work out how many individual US Citizens could be supplied with power, using the energy that we waste on a daily basis by transmitting ONLY junk in HTML across the internet. Remember, this is only using our initial value of 1.96% which was only for HTML content.
citizens_supplied = wasted_power / power_usage_per_capita
citizens_supplied = 189,716,869,717 / 4,255,336
citizens_supplied = 44,583
So using ONLY the space that's wasted by the transmission of the HTML content type, we could supply around 44,583 US citizens with Power.
The Wasted Space tool was built to inspect HTML for waste. We decided on this content type because it's pretty easy to fetch and then parse HTML and the criteria for waste are pretty simple. We just hunt for multiple spaces, line-breaks and tabs.
What if we swapped out the value of 1.96% that represents ONLY the HTML content types, and instead used a value of 100%. This value would then represent not only HTML, but ALL of the content types across the internet (Video, Images, HTML, Stylesheets, Scripts, Fonts and Other).
wasted_power = power_usage × all_content × web_data × space
wasted_power = 350,000,000,000,000 × 1.00 × 0.25 × 0.1106
wasted_power = 9,679,432,128,417 (Watt hours)
If we then use that value in our previous citizens_supplied calculation...
citizens_supplied = wasted_power / power_usage_per_capita
citizens_supplied = 9,679,432,128,417 / 4,255,336
citizens_supplied = 2,274,658
The population of San Jose (encompassing much of Silicon Valley) by the way, had a population of around 1,025,350 people in 2016.
Hope you've enjoyed the ride... Now why not test your own site.