Add Expires or Cache-Control headers
The Expires
and Cache-Control
headers determine how long a browser should keep a resource in its cache. You should therefore use them, and configure them correctly for CSS style sheets, JavaScript scripts and images.
Ideally, these elements should be kept as long as possible so that the browser does not request them again from the server. This saves HTTP requests, bandwidth and CPU power server-side.
Choose the most suitable technology
The choice of technology is key to optimizing resources; choose the most eco-friendly tool that fits the purpose and meets all the needs.
Here are the five largest families of solutions available, in descending order of eco-friendliness.
- Static website (created with specialist software such as Dreamweaver, or a code editor)
- Generated website (e.g. using Jekyll, a tool in Ruby that, amongst other things, can process templates and construct permalinks)
- Custom-built dynamic website (with PHP, J2EE, .NET, etc.)
- Custom-built dynamic website using a framework (such as Symfony)
- Dynamic website developed using a CMS (such as Drupal, Joomla!, Jahia, etc.).
The more the solution is ‘packaged’, the more abstraction layers are stacked, hampering performance.