In an article published last month on the Design Ledger website, the author establishes a causal link between the declining attention span of Internet users and the need to increase the loading speed of websites.
"Reducing the attention span is one of the biggest threats to your website."
Without criticizing the validity of such an assertion, the fact remains that a slow website has verifiable consequences on visitor behavior. According to various sourcest:
- 40% of visitors abandon a website that takes more than 3 seconds to load;
- A reduction in loading time of 8 to 2 seconds increases the conversion rate of visitors by 74%;
- Google now uses the loading time of a website as one of the elements contributing to its ranking in the results of its search engine.
The factors that make a web page load more or less quickly are very numerous. One of the first thinga to look at, which is used by Google in its ranking, is the TTFB, or time to first byte.
What is the TTFB
When calling a web page in our browser, the following actions are executed first:
- The domain name is translated into an digital IP address, identifying the address of the web server. This translation is done through Domain Name Services (DNS), whixh are distributed throughout the internet.
- Once the server's IP address is known, your web browser establishes a connection to that server.
- Once the connection is established and confirmed, the web server starts to prepare its response to your request. It builds the requested page.
- As soon as it is ready, the server starts to send its answer to your computer, the content of the requested page. This response is broken down into a series of packets of data that are routed to your computer over the internet. The number of these packets will be determined by the amount of information contained in the requested web page. It is when your computer receives the first of these packets that the TTFB is registered.
The ideal target speed of the TTFB would be 400 milliseconds maximum. A server should therefore be able to send the first of the data packets to your browser in just under half a second. As this is the start of the reception of the data packets, a slowness at this level will obviously have consequences for the further loading of the site.
There are several factors that can contribute to the TTFB's speed variation: the geographical location of the web server, its technical configuration, the number of tasks required by the server's main processor, the number of concurrent connections, and so on.
At Percumedia, we make sure the TTFB of the websites we develop and hostis below 400ms. Our tests reveal that this is the case in more than 90% of the time.
Speeding up transmission
To achieve this result, we have taken a number steps to optimize the response of our server to requests from web browsers. One of them was the setting up of a reverse proxy cachem which is also called a web accelerator. It is a virtual server located between the visitor's computer and the web server, on which the most frequently requested files are temporarily cached, thus freeing part of the web server's tasks.
In summary, we could say that the reverse proxy cache is an additional server, whose only function is to manage incoming and outgoing traffic, and to keep in its memory the files most often requested so as to serve sites faster.
The use of a reverse proxy cache makes it possible to process a greater number of concurrent connections while speeding up the transmission speed of the web pages.
Another speed performance measure involves more specifically sites that web build.
As you know, we use Drupal as a development platform for all our websites. When a web page is requested by a visitor, Drupal must first build it using multiple files and interacting several times with a database that contains all the contents of the website as well as some of the instructions for displaying these.
In order to speed up the delivery process of these pages, Drupal caches them so they do not have to be rebuilt every time. Only when content is modified or added does Drupal rebuild the cached page. As this process ensures that the web pages are always ready to be sent, this has a very significant impact on their transmission speed.
In a future article, we'll look at other ways to speed up the display of website pages, some of which you can use before entering new content into your website.