The Good Manager  >  Training modules

100 points to know about...
Eco-Design Web Development

100
points to know about...
Back to module summary

Notion 89

More efficient and less resource-intensive servers

Target skills

Understand how to set up a server to optimise files

Servers delivering content for a website can optimise its files in several ways in order to optimise file size, resource consumption, delivery time, and web page loading. By setting servers correctly, you can therefore reduce its resource consumption. For this, we will have a look at Gzip compression, caching.

Automatic Gzip Compression

By enabling the gzip compression on your server, you could reduce your websites files to a third of their size. The files sent to visitors will be lighter and compressed, hence reduce the website carbon footprint and make the website load faster. The browser of the user will decompress it automatically. It is a must have solution, easy to implement with no downside!

You can enable the gzip option directly from your hosting provider or by modifying the server configuration file (.htaccess). You can learn more about Gzip compression here: https://www.giftofspeed.com/enable-gzip-compression/

Server caching

Caching a file is the action of storing it to avoid further requests for accessing it. By caching a file, you already have it on your disk, and don’t need to ask a server to send it again, therefore reducing the data transferred and loading time.

Cache can be limited in time by setting expirations conditions, and affect different kinds of files. It is configurable directly from your hosting provider or by modifying the server configuration file (.htaccess) once again. Learn more about the caching options for your Apache server here : https://httpd.apache.org/docs/2.4/caching.html

Content Delivery Network

A CDN or Content Delivery Network is a network of servers to deliver web content. It acts as an intermediate before your own server, so requests are sent to this CDN instead of to your main server. It helps mitigate DDos attacks (Attacking an online service in order to make it unavailable) and its localisation can be closer to your visitor than your actual server, which reduces the network load. It has cache and gzip options (see above).