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

◂ Web Development guidelines

3.2 Minify and remove unused code

Web Development

Minify code and data, and remove unused characters to reduce file size and improve loading efficiency and maintainability.

Success Criteria

  • Minified code:
    Minify code and data files by removing unnecessary whitespace, comments, attributes, and non-essential characters. Apply this consistently across the system to reduce file size and improve loading efficiency. This helps to reduce cumulative data transfer and processing overhead at scale, improving resource efficiency and reducing energy consumption. Ensure that minification does not introduce any errors.
  • Remove redundancy:
    Identify and remove unused or dead code, especially in CSS and JavaScript.

View the Guideline

Tags

AccessibilityPerformanceHTMLJavaScriptCSS

Share

More web development guidelines

3.1 Set goals based on performance and energy impact

Web Development

3.3 Modularize bandwidth-heavy components

Web Development

3.4 Avoid redundancy and duplication in code

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 2026. Privacy Policy.