Lesson 3

Programming and hosting your digital tools

updated on
 16/10/2023

Excessive use of JavaScript, CSS, requests, plugins or widgets can adversely affect the performance of your website or mobile application, and considerably increase the consumption of resources such as bandwidth, processing and memory. A few good practices can help you reduce the environmental impact of your digital tools.

3 ideas to make a website more sustainable

What is responsible development?

When you want to develop a website or an application, one of the most important decisions is the choice of programming language or the tool you are going to use for development.

Here are a few examples:

  • CMS: fast, easy, no need to optimise the code, but requires plug-ins and leads to excessive use of the database and server;
  • Language for custom development (PHP, Java, etc.): very flexible, high-performance and secure, but requires more development time, costs more and consumes more energy;
  • C and Pascal: much lower power consumption, reduced memory usage, more ecological options.
  • Compress and reduce the size of CSS and JavaScript;
  • Avoid costly and unnecessary JavaScript/CSS animations;
  • Harmonise CSS classes across all pages;
  • Compress or minimize files (HTML, CSS, JS, SVG);
  • Replace the interface images with CSS cascading style sheets and pictograms;
  • Limit the number of CSS or cut them out;
  • Use CSS compartments and modify several CSS properties at once;
  • Combine CSS and JavaScript files;
  • Avoid lengthy JavaScript processing;
  • Cache elements that are constantly accessed in JavaScript;
  • Write CSS class selectors efficiently;
  • Outsource CSS and JavaScript;
  • Eliminate third-party scripts;
  • Use JavaScript and CSS libraries if necessary, using only the essential elements.

Caching is a technique that allows all resources to be stored locally in the user’s browser or on a nearby proxy server, allowing resources to be downloaded more quickly on subsequent visits, and therefore reducing the environmental impact of each visit.

A few tips for using the cache server:

  • Cache Ajax requests;
  • Cache completely in RAM;
  • Use an HTTP cache;
  • Add Cache-Control or Expires headers.

Using plug-ins on a website can consume an enormous amount of resources and memory. It is therefore important to analyse carefully the types of plug-ins that are really needed and to consider alternatives that can produce the same result:

  • For example, replace the cumbersome and impractical Google Maps plug-in with an image of the location with the exact address and a link that redirects to an interactive map;
  • Replace social network plug-ins by their icon or name, with a link to the social network in question;
  • Avoid chatbots, especially if they don’t provide clear and precise answers to Internet users, who risk being frustrated.

On your site, visitors want to enjoy the most pleasant and efficient browsing possible. Hence the importance of improving interactivity.

To adopt a Green UX approach:

  • Implement web pagination by opting for a per-page deployment interface configuration, which lightens up the content and prevents visitors from getting lost in too much information;
  • Optimise the uploading of documents to your site: compress the files, write a brief description of the content and include two versions of the document (a short version and a full version), indicating the size and number of pages;
  • Optimise autocomplete by limiting the number of suggestions and the use of scripts, and by using a predefined list of options.

Your website or mobile application should be designed with long-term maintenance in mind. Here are some simple actions to take:

  • Appoint a person or team responsible for maintenance;
  • Periodically review the content to eliminate anything that is no longer useful;
  • Compare the environmental impact of your site or application and the changes resulting from the actions taken;
  • Check at least once a year that your digital tool works with different types of connection, such as 2G or 3G;
  • Make sure that the software used is up to date;
  • Check that your site or application continues to protect personal data.

To choose a web host, check that it performs the following actions:

  • Optimisation of the energy consumption of servers, for example by limiting the use of air conditioning to cool equipment;
  • Use of renewable energies and obtaining environmental certifications such as Energy Star, LEED, etc.;
  • Commitment to dematerialisation, recycling of equipment and working with local suppliers;
  • Complete control over the protection and security of backed-up data;
  • The implementation of a code of conduct and the adoption of ethical behaviour during operations.