Sustainable Tech | 5 Tips for Energy Efficient Apps

As a developer writing code for TV applications, there’s a focus on client projects for light CPU loads and reducing memory usage so that the apps can run as quickly as possible on even the most clunky devices. Recently, we’ve been looking into making our applications more energy efficient too.

As digital products have become more integrated into our daily lives, it’s important to consider the environmental impact of the technologies we use. Fortunately, there are several steps developers can take to reduce the energy usage of their websites and applications (in no particular order).

1. Optimise images and multimedia content

Images and multimedia content can be a major contributor to the energy usage of a website or application. To reduce their impact, we can optimise images and multimedia content by compressing files, reducing their size, and utilising newer file formats that require less energy to load.

2. Implement lazy loading

Lazy loading is a technique where content is only loaded when a user requests it, rather than all at once. This reduces the energy required to load a website or application, as well as improving page load times and user experience.

As an example, some browsers support the loading='lazy' attribute on img and iframe tags, which allows for loading resources only when they’re in the viewport. For browsers that don’t support it, you can utilise (or write!) a javascript polyfill that detect a user’s scrolling to load resources when they’re required.

3. Minimise the use of animations and scripts

Animations and scripts can be visually appealing, but they can also increase the energy usage of a website or application. To reduce their impact, developers can minimise their use, and where possible, replace them with more energy-efficient alternatives.

If you want animations on your site, use CSS animations over javascript, try to reduce your pages layers that multiple manipulations of different DOM elements can create, use browser APIs for animations, and consider the “less is more” approach when designing animations.

4. Reduce server requests

Server requests can be a significant contributor to the energy usage of a website or application. Developers can reduce the number of server requests by minimising the size of files, compressing data, utilising caching techniques, sideloading, and using bulk and batch requests.

6. Consider green web hosting

Green web hosting is a type of hosting that utilises renewable energy sources to power data centres. By using green web hosting, developers can reduce the carbon footprint of their websites and applications.

By implementing these steps, developers can reduce the energy usage of their websites and applications, and help minimise their impact on the environment. If you’re a developer, I encourage you to consider these strategies and do your part in creating a more sustainable digital future.

I hope you found this post helpful. Stay tuned for more posts on sustainable tech practices!

Feature image by Masaaki Komori, and images in blog post by Daria Shevtsova, Rima Kruciene, rawpixel

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s