The time taken by a website to load on the visitor’s browser should be below 2 seconds, and the TTFB, according to the page speed insights tool, must be lower than 600 ms. The TTFB time is the combination of SSL negotiation, DNS lookup, connect, etc times. TTFB was considered to be the most important page speed metric until Google introduced the concept of cumulative layout shift and largest contentful paint a few years back.
According to the search engine giant, having high LCP, and CLS values also impact the site’s speed. If you don’t fix the TTFB, LCP, and CLS issues, your site may not do well in search results, as page speed is one of the search engine ranking factors. Below, we’ve shared some of the methods you can follow to make the website faster by reducing the server response time, paint times, and layout shifts. If you’ve never worked on the performance of the site yet, you should start working on it right away.
If your site is hosted with a good hosting company, but the performance of the site is average or poor according to page speed testing tools, you should switch to a host that offers more or better resources. For example, if your existing host offers 512MB RAM, you can switch to another host that offers 1GB RAM, or if your existing host offers HDD instead of SSD, you must switch to a hosting company that provides SSD storage instead of HDD. This is because SSD is significantly faster than HDDs. Some of the hosting companies that ship SSDs with their servers are as follows:
Bluehost: Bluehost has four shared hosting plans, each plan offers a machine that has an SSD. The plans are priced between 2.95 and 13.95 dollars.
DreamHost: This hosting company has introduced just two shared hosting plans priced between 2.59 and 3.59 dollars. The shared servers of the company have SSD.
Hostgator cloud: Hostgator cloud plans offer more resources than the shared plans of Bluehost, Dreamhost, and Hostgator. The plans cost between 4.95 and 9.95 dollars.
If your site is hosted on a powerful machine and you have no plans to change the host, you can use a CDN service to bring down the response time of a website. What do CDN servers do? Content Delivery Networks store copies of the pages on their geographically distributed computing machines called PoPs. The CDN services nearest to the user’s location will send the cached page.
Caching tools reduce the load on the server significantly by saving copies of pages on it instead of generating the entire page. During the page generation process, the application may run SQL queries to update or retrieve data. This takes some time. If you’ve root access, you can use the Pagespeed module with apache or enable FastCGI cache if you’re using Nginx. If you’re using a content management system such as WP, you can use a caching plugin.
A good caching plugin will fix several page speed issues by eliminating unnecessary CSS/JS code, and combining multiple JS/CSS files into one after minifying them to reduce the number of HTTP requests, caching pages, etc. Caching plugins such as WP Rocket can reduce the layout shifts and paint times by generating and inlining critical CSS in the site’s header. Jetpack Boost, the free plugin by the WordPress core team, generates and adds critical CSS to the HTML code of the site automatically. You can thus use it with caching plugin.
If your DB server supports query cache, enable it. What does QC do? The query cache caches the result of queries. Instead of re-executing the query, the DBMS will send the result set, thereby reducing the content/data retrieval time. MySQL tuner is a Perl script that will check the database server’s settings and recommend some changes if the script finds some issues with your configuration.
Closing words: So, these are some of the methods you can follow to reduce server response times and make a website faster. Follow the methods if your site doesn’t score well in page speed tests.