The Green Software Foundation — whose members include Microsoft, Google, Accenture, Thoughtworks, and dozens of other organizations — has formalized what was previously a loose collection of practices into a coherent discipline. Green software engineering has its own principles, patterns, and metrics. And it is directly applicable to web development.
I want to walk through eight core principles, with practical web examples for each. These are not theoretical — they are actionable changes that development teams can implement today.
Principle 1: Carbon Efficiency
Emit the least carbon possible per unit of work. This is the overarching goal. For a website, "unit of work" is typically a page view, a transaction, or a user session.
In practice: measure your carbon per page view (use Carbon Badge), set a target, and optimize until you hit it. Everything in this article — and every other optimization technique — serves this principle.
The Green Software Foundation provides the Software Carbon Intensity (SCI) specification: SCI = ((E × I) + M) per R. Where E is energy consumed, I is carbon intensity of energy, M is embodied emissions of hardware, and R is your functional unit (page view, request, user).
Principle 2: Energy Efficiency
Use the least amount of energy to perform any operation. Energy efficiency reduces carbon regardless of the energy source — even renewable energy has embodied carbon in its infrastructure.
Web applications: reduce computation per request. Cache computed results rather than recomputing. Use efficient algorithms. Minimize DOM operations. Reduce the number and weight of HTTP requests. Every CPU cycle you eliminate reduces energy consumption.
Server-side: right-size your infrastructure. An over-provisioned server running at 10% CPU utilization wastes 90% of its energy on idle overhead. Auto-scaling that matches capacity to demand is more energy-efficient than fixed over-provisioning.
Principle 3: Carbon Awareness
Do more when the grid is clean, less when it is dirty. The carbon intensity of electricity varies by time of day (solar peaks at midday), by season (wind is stronger in winter in many regions), and by region. Carbon-aware software adjusts behavior based on current grid conditions.
For websites, this is harder to implement than for batch processing (which can easily time-shift). But there are applicable patterns: schedule heavy background processes (sitemap generation, image processing, database maintenance) during low-carbon hours, choose cloud regions with cleaner grids for processing workloads, and for global services, route traffic to data centers in regions with currently lower carbon intensity.
Services like Electricity Maps and WattTime provide real-time grid carbon data via API, enabling carbon-aware computing.
Principle 4: Hardware Efficiency
Maximize the utilization and lifespan of hardware. The embodied carbon in servers, network equipment, and end-user devices is substantial — manufacturing a laptop produces roughly 300-400 kg CO2e. Extending hardware lifespan from 3 years to 5 years reduces embodied carbon per year by 40%.
For web developers: build websites that work on older devices. Supporting a 5-year-old phone with limited RAM and processing power is not just accessibility — it is sustainability. Heavy JavaScript frameworks that require recent hardware to function smoothly effectively force hardware upgrades.
Server-side: maximize utilization. Serverless and container platforms share hardware across many workloads, achieving higher utilization than dedicated servers. Higher utilization = less hardware needed = less embodied carbon.
Principle 5: Measurement
If you cannot measure it, you cannot improve it. Green software engineering requires instrumentation — measuring energy consumption, carbon emissions, and resource utilization at every level.
For websites: embed carbon measurement into your CI/CD pipeline. Measure page weight, performance scores, and carbon per page as part of every deployment. Set performance budgets and fail builds that exceed them. Track trends over time in your monitoring dashboards.
The SCI specification provides a standardized measurement framework. Carbon Badge provides per-page measurement. Cloud provider dashboards provide infrastructure-level data. Together, they give a complete picture.
Principle 6: Demand Shaping
Shape demand to match supply rather than scaling supply to match demand. This principle comes from energy grid management — using electricity when it is abundant (and clean) rather than generating more when demand peaks.
Web application examples: serve lighter versions of pages during high-traffic periods (reduce image quality, defer non-essential features), implement progressive loading that delivers core content immediately and enhancements later, design UX that discourages unnecessary resource consumption (do you really need infinite scroll that loads hundreds of items?).
This is also about product design. Features that encourage users to consume less data — data saver modes, text-only options, efficient search that finds results in fewer page loads — are demand-shaping strategies.
Principle 7: Optimization
Continuously improve the efficiency of existing software rather than only adding new features. In the web development world, this means: regularly audit and optimize existing pages (not just new ones), review and update dependencies (newer versions are often more efficient), remove unused features, code, and data, and refactor inefficient patterns when they are identified.
Technical debt is not just a development problem — it is a sustainability problem. Unused code still gets downloaded and parsed. Inefficient database queries still consume energy. Legacy systems running on outdated infrastructure still waste resources.
Principle 8: Networking Efficiency
Reduce the amount and distance of data transmitted over networks. Networks consume approximately 14% of the web's total energy (per the SWD model). Reducing data transfer reduces network energy proportionally.
Compression (Brotli > gzip for text content). CDN usage (serve from edge, minimize transit distance). HTTP/2 and HTTP/3 (multiplexing reduces connection overhead). API efficiency (GraphQL to fetch only needed fields instead of entire resources, pagination instead of loading all results). Caching at every layer (browser, CDN, application, database).
Putting Principles Into Practice
These eight principles are not a checklist to complete once. They are a lens to apply continuously — during design, development, code review, deployment, and monitoring.
Practical starting points for web development teams:
Add carbon to your definition of done. A feature is not done until its carbon impact has been measured and is within budget.
Include sustainability in code reviews. Does this PR increase page weight? Does it add unnecessary JavaScript? Does it download resources the user has not requested?
Set performance/carbon budgets. Maximum page weight per page type. Maximum JavaScript per route. Maximum carbon per page view.
Measure in CI/CD. Use tools like Lighthouse CI, sitespeed.io, or custom scripts to measure performance and estimated carbon on every merge to main.
Train the team. The Green Software Foundation offers a free Green Software for Practitioners certification. It takes a few hours and gives developers a solid grounding in the principles.
Green software engineering is where sustainability meets craftsmanship. Building efficient, well-optimized software is good engineering. That it also reduces environmental impact is a bonus — but a significant one, given that the ICT sector produces roughly 2-4% of global emissions, comparable to aviation.