GREEN CODING Guide
by VAST FORWARD

Green Coding in web development is a fundamental part of Vast Forward’s sustainability strategy. Not only are we reducing the energy demand and greenhouse gas emissions within our company this way, but also across our entire supply chain.

Extrapolated to servers and devices worldwide, each line of code has the potential to lower the energy demand and emissions. If developers make their code just a bit more energy-efficient, the scalability effects can achieve a tremendous amount.

Extrapolated to servers and devices worldwide, each line of code has the potential to lower the energy demand and emissions.

Note: The CMS Wordpress automatically generates different sizes of embedded images, which are often not needed or used – these can be disabled.
Through plugins like Better-Image-Sizes, required image sizes can be generated on the fly and only in the needed sizes.

1Choose between 60-70% or an optimal balance between image size and quality. 2CMS, e.g. Contao, have the capability to convert images to WEBP and deliver them. For Wordpress, various plugins can be used for this purpose, e.g. Images to WEBP as a free option (https://wordpress.org/plugins/images-to-webp/) 3Content Delivery Networks (CDNs) können den Ablauf von Inhalten verwalten und die physische Entfernung zwischen Server und Nutzer verringern.

4In an ideal scenario, scripts are minimized in advance. If that's not possible, CMS can also take over or be enabled to do so via plugins. In Wordpress, for example, Autoptimize. 5https://medium.com/@netxm/what-is-tree-shaking-de7c6be5cadd

6Critical CSS can be generated and integrated through tools and plugins, e.g. via https://www.sitelocity.com/critical-path-css-generator.

7https://walterebert.com/blog/subsetting-web-fonts

8There are many plugins with varying amounts of functions for Wordpress. E.g. a simple and good plugin would be WP Fastest Cache.

Tools

Various tools can offer a good idea of how a website is performing and whether it is sustainable. Some also provide direct suggestions for optimization opportunities.

  • Digital Beacon: Calculates the CO2 footprint of a page on first and repeated visits. However, it does not provide an overview of the entire “weight” since it does not include the complete page in the calculation.
  • Ecograder: Another tool that can calculate the CO2 footprint.
  • Cabin: CO2 conscious, sustainable analytics tool that also checks the CO2 footprint of each page (External tool with a subscription model).
  • Google PageSpeed Insights and GTMetrix: Show the current performance of a web page and provide options for further optimisation.