Skip to Main Content
Sustainable Web Design Logo
  • Home
  • Guidelines
  • Emissions
  • Ratings
  • Contact

◂ Web Development guidelines

3.5 Avoid redundancy and duplication in code

Web Development

Improve solutions rather than recreating them, using good organization strategies to simplify code where possible and reduce redundancy.

Criteria

  • Remove or simplify: Human-testable
    Remove duplication and/or simplify and optimize your code for better performance, focusing on essential features so you have a cleaner, less redundant product and codebase.
    • 25 Techniques for Javascript Performance Optimization
    • Fixing your website’s JavaScript performance
    • JavaScript Optimization
    • Optimizing Javascript for fun and for profit
    • The Art of Clean Code
    • United Nations SDGS – Goal 12 – Consumption & Production
  • Iteration over recreation: Human-testable
    Improve existing solutions rather than redeveloping and redesigning products from scratch, since the latter would duplicate the coding effort and maintenance burden for developers rather than reduce the learning burden for users.
    • A Sustainable Design Handbook
    • Becoming a Better Programmer: Improve Code by Removing It
    • Stop Redesigning And Start Tuning Your website Instead
    • United Nations SDGS – Goal 12 – Consumption & Production
    • When you Should—and Shouldn’t—Consider Redesigning your Website
    • Why Website Redesigns Should be Avoided (And a Proven Process)
    • You’ll Rebuild Everything Every Four Years Anyway
  • Organize code arrangement: Machine-testable
    Use organization methodology and systems such as Don’t Repeat Yourself (DRY) or Write Everything Twice (WET) to optimize the arrangement and output of your JavaScript and CSS.
    • 3 software development principles I wish I knew earlier in my career
    • AHA Programming
    • BEM
    • Clean Code Essentials: YAGNI, KISS, DRY
    • Clean Code Explained
    • Clean Code in JavaScript
    • CSS: Classes Seriously Sprawling
    • DRY CSS: How to Use Declarations Just Once, Effectively
    • Organizing your CSS
    • Produce clean and maintainable code
    • The Art of Clean Code
    • The systemic failure of implementing CSS principles
    • Web Almanac: Sustainability

Benefits

  • Accessibility
    Following naming conventions used in methodologies can be easier for developers with accessibility needs to follow and use compared to generic selector identifiers.
  • Economic
    Using an optimized and reusable codebase can enhance productivity and code quality leading to a better return on investment.
  • Environment
    Integrating certain methodologies can add code to your markup, but they also improve maintainability. This reduces development time at scale, and could reduce energy consumption as developers optimized workflows will reduce the time and energy spent on tasks.
  • Performance
    Avoiding repetitive code reduces waste in markup, which reduces the time it takes to download site data. This also reduces server-side impact.

GRI

  • Materials: Medium
  • Energy: Medium
  • Water: Medium
  • Emissions: Medium

View the Guideline

Tags

PerformancePatternsCSSJavaScript

Share

More web development guidelines

3.1 Set goals based on performance and energy impact

Web Development

3.2 Remove unnecessary or redundant information

Web Development

3.3 Modularize bandwidth-heavy components

Web Development

Learn about W3C’s Sustainable Web Interest Group:

A global community advancing sustainability on the web.

Explore the group

This site is brought to you by

Mightybytes Wholegrain Digital
Website Carbon

This page loaded in 0.25 seconds and emitted just 0.5g of CO2

Visit Website Carbon
Ecograder

How green is your website?

Visit Ecograder
© Copyright Sustainable Web Design 2025. Privacy Policy.