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

◂ Web Development guidelines

3.23 Take Advantage of Native Features

Web Development

Ensuring that your code is free of redundancy by using pre-existing functionality provided by the web browser is important as it will help you to reduce the amount of time wasted, re-creating the same components, this offers obvious sustainability benefits in terms of time in front of the screen.

Criteria

  • Native Over Custom: Use native functions, APIs, and features over writing your own.

Impact

Medium

Effort

Low

Benefits

  • Environmental:
    Avoiding repetition of pre-existing features improves efficiency, which ultimately will lead to less redundancy, less development time, and thereby emissions saving for the construction of the product or service.
  • Performance:
    Native features will have been well optimized, it’s unlikely a custom component will match this, therefore a native function will not only load quicker but will use fewer resources.
  • Economic:
    Existing features don’t require additional development time, so is a time saver.

GRI

  • materials: Medium
  • energy: Medium
  • water: Medium
  • emissions: Medium

Example

  • Code:
    <button onclick="window.dialog.showModal()">open dialog</button>
    <dialog id="dialog">
    	<p>I'm a dialog.</p>
    	<form method="dialog">
    		<button>Close</button>
    	</form>
    </dialog>
  • HTML [dialog] (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) API example.

Resources

  • 15 Tips to Optimize Your PHP Script for Better Performance for Developers
  • Energy Efficiency across Programming Languages (PDF)
  • [GPFEDS] 1.9 – Strategy (Interoperable Technologies) (PDF)
  • [GPFEDS] 4.5 – UX and UI (Native Components) (PDF)
  • How to improve PHP performance in your web application
  • Native features of the browser
  • PHP Function and Method listing
  • Web APIs

View the Guideline

Tags

CompatibilityUIPatternsHTMLCSSJavaScript

Share

More web development guidelines

3.1 Identify Relevant Technical Indicators

Web Development

3.2 Minify Your HTML, CSS, and JavaScript

Web Development

3.3 Use Code-Splitting Within Projects

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.