Here are some more useful tips to decrease site loading time.
Reduce Server Response Time
One of the important factors that affect page loading time is the time taken for DNS lookup.
A domain name system server has the list of IP addresses and associated hostnames. When you type a URL in the address bar, the DNS server finds the IP address associated with the URL (domain name).
When the browser gets the IP address, it knows where to find the website you are looking for. If your DNS server is slow, it would need more time for DNS lookup that would ultimately increase page loading time. You need to look for a fast DNS server that would complete the translation of URL into IP addresses in a jiffy.
TTFB is short for Time to First Byte. It refers to the fraction of time the browser has to wait to get the first byte of data from the website server.
The recommended Time to First Byte is around 200ms. If your website TTFB is more than 200ms, there might be some issues that need to be taken care of. The Time to First Byte is a server-side issue and there are many factors associated with it. Some of the main factors are traffic, network issues, web server configuration, and dynamic content creation. There are several ways to reduce Time to the First Byte.
The easiest way to reduce TTFB is by using caching on your WordPress website. Caching not only decreases page loading time but it also reduces TTFB to some extent.
Since traffic is one of the factors affecting TTFB, you can use the Content Delivery Network to speed up website access. Content Delivery Network (or CDN for short) uses a network of geographically located servers to reduce the distance between visitor and your website server.
The CDN has servers located at multiple locations store a cached version of your site. Whenever a visitor tries to access your website, the CDN connects the user with server closest to the user’s location and this in turn reduces the time frame in TTFB.
The page loading time greatly depends on the file size. File size can be reduced by enabling compression on your WordPress website. Compression works well for CSS and HTML files as they have repeated code and white space.
Compression technologies like Gzip are well-known in web development and accepted by web servers. You can use W3 Total Cache and WP Rocket plugins that support Gzip compression.
After installing W3 Total Cache, you need to check the option “Enable HTTP (gzip) compression” to allow the web server to compress files before sending them to the browser.
Choosing right hosting type
There are two main types of web hosting – shared and dedicated web hosting.
In shared hosting setup, many websites share hosting resources like RAM, disk space, and CPU.
On the other hand, in dedicated hosting, your website always has access to a dedicated portion of web hosting resources.
In shared hosting, there is no guarantee that your website would get the hosting resources it needs when the Web server on which your website resides is experiencing high traffic. However, in dedicated hosting, the hosting resources assigned to your website are exclusively available to your website at all times.
When fast site loading is a priority, dedicated hosting is more recommended.