ith climate change becoming an ever pressing issue, it is important to consider the carbon footprint of all aspects of our lives, including our jobs online. While it may not seem like websites have a direct impact on the environment, they actually contribute to a significant amount of carbon emissions. As a web developer, you will most likely be online a lot and could influence the ability for your company's website to be more sustainable.
The Climate Impact of Website Pages
Many of us won’t know how our day to day lives unknowingly damage the environment. Simply by loading a website page releases carbon emissions. When you enter the URL of a website in your browser, the request is sent to a server, which then sends back the website's HTML, CSS, and JavaScript files. These files are downloaded onto your device, and your browser then renders the website. All of these actions require energy, and that energy often comes from fossil fuels which contributes to climate change. Research by the Shift Project reported that the internet and ICT industry accounts for 4% of global greenhouse gas emissions - which is the same as the aviation industry. So what can web developers do about it?
What Web Designers Can Do to Lower the Carbon Footprint of Their Web Pages
Fortunately, there are steps web designers can take to reduce the carbon footprint of their web pages. Here are a few examples:
- Optimise Images
Images are one of the largest contributors to the size of a website page, and larger file sizes require more energy to transmit. By optimising images, web designers can reduce the size of website pages, which in turn reduces the energy required to transmit them. There are several tools available to help with image optimization, including Adobe Photoshop and online tools like Smush which we used for this blog.
- Minimise HTTP Requests
HTTP requests are the number of requests a browser makes to a server to retrieve all the files necessary to render a website page. The more requests a browser has to make, the more energy is required to transmit the data. Web designers can minimise HTTP requests by reducing the number of files needed to render a page. This can be done by combining CSS and JavaScript files and reducing the number of images used.
- Use Efficient Code
The code used to build a website can also impact its carbon footprint. Inefficient code can result in slower loading times and increased energy consumption. Web designers can use efficient code by following best practices for HTML, CSS, and JavaScript. There are several online resources available to help with this, including Google's Web Fundamentals and Mozilla's Developer Network.
- Use a Content Delivery Network (CDN)
A CDN is a network of servers located in different parts of the world that can deliver website content more quickly to users. By using a CDN, web designers can reduce the distance data has to travel, which in turn reduces the energy required to transmit it. CDNs are available from companies like Cloudflare and Akamai.
- Use Green Web Hosting
Green web hosting is a type of web hosting that uses renewable energy sources to power the servers that host websites. By using green web hosting, web designers can ensure that the energy required to host their website pages comes from renewable sources. Green web hosting is available from companies like GreenGeeks and HostPapa.