8 minutes reading time (1578 words)

Sustainable Web Development with Joomla - Part 1

JCM - Sustainable Web Devolpment - Part 1

The digital landscape is evolving rapidly, and sustainability is no longer just a buzzword – it's a necessity. As businesses and developers strive to reduce their environmental footprint, sustainable web development has emerged as a critical focus. 

Joomla offers unique opportunities to build websites that are not only efficient and user-friendly but also environmentally responsible. Philip Walton wrote an excellent article titled “Green websites help to keep your feet dry” in the April 2024 issue of JCM, where he listed some key sustainability principles not only for building green websites but also for the sustainable operation of Open Source Matters and the Joomla Community in general. In this article we will delve deeper and expand on the technical aspects of sustainable website development combined with the comparative advantages of Joomla that contribute decisively to developing a sustainable website.

Understanding Sustainable Web Development

Sustainable web development is about creating websites that minimize energy consumption, optimize resource usage, and ensure longevity. This involves efficient coding, streamlined designs, and hosting solutions that prioritize renewable energy. The goal is to reduce the carbon footprint of digital services while maintaining high performance and accessibility. 

Initially, when we talk about the energy efficiency of websites, it is clear that we are largely referring to technical steps in website development. However, efficiency can be improved before we even start implementing a website. At the same time, design and content have a large impact on energy efficiency. Therefore, the following practices are key elements that one should consider before, during and after building a website.

Before Building a website: Web Hosting Selection

One of the first practical issues that arise during the design phase of a website is choosing the appropriate web hosting environment. Websites consume a lot of energy due to the need for uninterrupted server operation and data transmission to and from the data center. Carefully selecting the company that will host the website can, therefore, significantly impact the website’s energy efficiency and speed. Some practical tips here include: 

  • Use a data center close to your users. A large portion of the energy consumed by the internet is used for data transmission via telecommunications networks. It’s self-evident that the farther information has to travel, the more energy it requires. Therefore, choosing a data center near your target audience will help reduce energy consumption. For example, you might find an economical web hosting package from a company with data centers in the U.S., but if your target visitors are in Greece, energy will be wasted transmitting data across the Atlantic.
    Additionally, this long distance may also cause delays in page load times - incidentally, a ranking factor for search engines. Hence, choosing a data center near your main target group is beneficial for both visitor experience and the planet.
  • Use a data center with a decent PUE rating. PUE stands for Power Usage Effectiveness and is the standard measure of energy efficiency for data centers. It represents the percentage of computing power supplied with energy compared to other systems such as cooling and lighting. Initially, you can focus on a web host that, at the very least, has the capability to measure basic metrics regarding its energy efficiency. Ideally, you want them to be transparent about their PUE and, even better, have a low rating. The perfect PUE score is 1.0, however the global average has been “stuck” at 1.56 in recent years (Source: Uptime Institute Global Data Center Survey 2024). It’s also worth noting that PUE is just a simple metric, as many other factors influence it, such as the climate of the physical location where the data center is situated, but it still provides an indicative measure of efficiency.

In any case, choosing a green web host should meet substantial, measurable criteria. Some companies have sustainability policies regarding the use of green energy for their data centers. Of course, the issue of green energy usage is even more specialized and could warrant an entire article on its own, as not all commitments carry the same weight (for example, there’s a difference between using your own renewable energy infrastructure and purchasing electricity from renewable sources in the grid). Dan Atrill wrote a very interesting article in the December 2024 issue of JCM, titled "The Carbon Footprint Of Websites or How Green Is My Homepage?", where he outlines the responsibility of web hosting companies for the energy footprint of the internet, as well as our own responsibility as developers and consumers of such services. Ultimately, a responsible hosting company should have tangible and measurable commitments regarding their carbon footprint, not vague statements like “we protect the environment.”

During the Implementation

You probably won't read anything here that you didn't already know if you are a web developer, as this is a series of good practices that have governed the web development industry for years.

Let's start with the most obvious:

Write clean and simple code. By, for example, avoiding unnecessary code repetition or writing efficient queries, you not only make your website run faster and more efficiently, but it can obviously be maintained more easily. Of course, this does not only apply to the code you write, but also to the code you “borrow”. If, for example, you use existing frameworks and libraries, then you need to adapt them to your needs so that you only use those parts that provide the functionality you need. Loading an entire library to use e.g. an icon is like shooting sparrows with a cannon. This principle combines wonderfully with Joomla. Unlike other CMSs which often require you to install a third-party extension even for the simplest function, Joomla already provides out of the box most of the functionality you will probably need for your website. In this way, you also enhance the security of your website (as you are less dependent on third-party Extensions), make it faster, more functional and ultimately minimize the server load. Additionally, Joomla offers incredible flexibility thanks to its advanced override capabilities, allowing you to adapt it perfectly to your needs.

Use less JavaScript. JavaScript affects the efficiency of a website in two ways: by adding larger files to the website and by increasing the amount of processing required by the server or the user’s device. Both of these ways, of course, lead to more energy consumption. You can look for alternative ways to achieve the intended interaction with the user (since this is usually what you use JavaScript for), for example by exploring whether CSS3 can cover you for an animation. But even if you can’t avoid using JavaScript, you can at least use it effectively, for example by executing it towards the end of the webpage load. Special mention needs to be made here of visitor tracking and advertising scripts, which rarely add any value to the visitor, but can add significant weight to the files being loaded, cause significant CPU usage, slow down websites and -quite often- violate users' privacy.

Use the right fonts. There are techniques that can be used to minimize the size of fonts on websites, which often burden them more than they should. For example, modern font file formats, such as WOFF and WOFF2, which use higher compression methods compared to TTF, OFT or SVG file formats, can lead to file size reductions of up to 97%. You can also use a subset of the font you want, so that it only includes the characters required on the website. If you don’t have a particular font preference, then you can use a classic font family like Arial or Times New Roman. They may not be the prettiest, but they have the advantage of being able to be used without loading any font files, as they are already on the users’ devices.

Use the latest version. In what? In everything! Starting from the latest PHP version. The latest versions of PHP are not only faster but also use fewer computing resources and therefore less energy. Joomla 5.X requires at least PHP 8.1 (not actively supported since November 2023) but recommends PHP 8.3 (actively supported till December 2025, see PHP Supported Versions). In addition, using the latest version of Joomla itself as well as any third-party Extensions also makes your website easier to maintain over time. Besides, as Joomla evolves, it constantly becomes faster and more efficient itself.

Design it right. One of the most essential elements of a website is a design that ensures a good user experience (UX) by reducing friction in their movements. We want people to be able to find the things they want and perform the actions they need to do in the best possible way. Good design makes using a website easier and more enjoyable for everyone, and once again reduces the amount of energy wasted scrolling through pages that don't serve their purpose or staring at pages trying to figure out what to do next.

Design for Accessibility. Speaking of good UX, you can also ensure inclusivity by following WCAG (Web Content Accessibility Guidelines). Joomla 5.X is out of the box accessible since its default template, “Cassiopeia”, aligns with WCAG 2.1 AA level standards. Moreover, it includes built-in Accessibility Tools to help you keep your website accessible as you build it. 

Stay tuned for Part 2 of Sustainable Web Development with Joomla as we will discuss what are the most important aspects of sustainable web development after the implementation and during the operation of a website.

Some articles published on the Joomla Community Magazine represent the personal opinion or experience of the Author on the specific topic and might not be aligned to the official position of the Joomla Project

0
The January Issue
 

Comments

Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/