Green Coding: How to Build Websites That Use Less Energy

A 3MB landing page and a 300KB landing page don't just load at different speeds — they move a different number of electrons through a different number of routers, base stations, and data center racks to reach the same screen. Most performance work already targets the byte counts that drive energy use, but it's rarely framed that way, which means the actual mechanism — how a fetch() call becomes grid electricity — gets skipped over. Understanding that mechanism changes which optimizations are worth prioritizing, because not every kilobyte costs the same amount of energy, and not every "green" tip actually moves the number that matters.

How a Byte Becomes a Watt

Every model that estimates a website's carbon footprint — including the Sustainable Web Design (SWD) model used by tools like Website Carbon Calculator — starts from the same three-stage pipeline: energy consumed by the data center serving the request, energy consumed by the network transmitting it (undersea cables, core routers, last-mile infrastructure), and energy consumed by the end-user device rendering it, split further into operational and embodied (manufacturing) emissions (Sustainable Web Design Model documentation). Published estimates for the energy intensity of data transfer vary depending on assumptions about network efficiency gains and grid intensity, and the model itself was substantially revised in its v4 release to reflect updated internet energy datasets () — a reminder that these figures are evolving estimates, not fixed physical constants. What holds regardless of which version of the model is used: transfer volume is the lever with the most direct, measurable relationship to energy draw, which is why page weight is where this piece starts.