Skip to main content

Copy of some Draft Web Development Guidelines

Modularize bandwidth-heavy components within projects

This approach is applicable across various programming languages and platforms, both client-side and server-side. By modularizing code and assets, you can ensure faster load times, better resource management, reduce redundancy, and improved scalability for your application. Additionally, reducing unnecessary data transfer and optimizing load times can contribute to more energy-efficient operations, helping to lower the environmental impact, improve the UX of your web application or service.

Criteria: Code splitting

Machine-testable

Break down bandwidth-heavy components, front-end and back-end into smaller, modular segments that can be loaded only when required.

Resources

Impact: Medium, Effort: Low

GRI Impact of Modularize bandwidth-heavy components within projects
GRI Impact
materials Medium
energy Medium
water Medium
emissions Medium
Benefits of this guideline
  • Performance: Having smaller (modular) components allows for more optimized caching and loading only what code functions are required (which reduces the payload). Unused portions of a resource remain un-downloaded (potentially huge savings).
  • Economic: Reducing the size of large files will result in lower bandwidth bills for service providers.
  • Conversion: A faster website reduces the chance of abandonment (which is especially of concern for visitors of handheld devices).

Example
  • code link.addEventListener("click", (e) => { e.preventDefault(); import("/modules/my-module.js") .then((module) => { /* Do something */ }) .catch((err) => { console.error(err.message); });});
  • content Dynamic Imports.

Tags: