If you are following my earlier posts you must have seen that I am keeping an eye on web page test results to evaluate my website speed. I am already done with setting up an effective CDN and leveraging browser cache or cache static content.
Here I am to improve the time to first byte which is really important to reduce server response time.
Before we proceed to boost time to first byte we must know what is it and why TTFB is so important.
WHAT IS TIME TO FIRST BYTE (TTFB)
TTFB is the amount of time taken for the first piece of information on your webpage to reach visitors browsers. So if time to the first byte is less, naturally your web page load will be faster.
Slower TTFB contributes to noticeable delay in web page loading. The delay occurs due to the time gap between the browser requesting a page and the data received from the server.
WHAT IS CONSIDERED A GOOD TTFB?
You should reduce your server response time under 200ms. There are dozens of potential factors which may slow down the response of your server: slow application logic, slow database queries, slow routing, frameworks, libraries, resource CPU starvation, or memory starvation~ Google PageSpeed Insights
Google clearly says that your server response time should be under 200 ms. If you check the top sites you will see that most of them have ttfb under 200 ms as recommended.
As per the grading system of WebPageTest:
- Above 2 seconds: Grade F
- Above 1 second: Grade E
- Above 0.8 ms: Grade D
- Above 0.6 ms: Grade C
- Above 0.4 ms: Grade B
- Anything below that: Grade A
I must add that Grade F affects SEO very badly. So at least you should try to have an average TTFB to avoid bad SEO impact.
HOW TO IMPROVE TIME TO FIRST BYTE
As TTFB is the server response time so definitely having a good hosting speed solves the issue.
Most of us use shared hosting to host websites as lower costs are indulged. Shared hosting from Hostgator, Bluehost, GoDaddy also helps us with the convenience to host sites with easy installation and site creation. But as the name propels it is ‘shared‘ so a massive number of sites are loaded on same servers. So, there are down-times, speed issues which ultimately effects the TTFB.
You can check your server density here.
A dedicated hosting will make your TTFB consistent and also make it as fast as within 100 ms.
Use an effective cache plugin. Cache reduces time to the first byte. A Cache itself delivers the requested web page and hence enhance loading speed.
W3 Total cache, Wp Super Cache, Quick Cache, WP rocket all are worthy. Just check which one works best for your site.
If you are using w3 total cache then go to
Performance> Dashboard> Empty all caches
A new window will open up if you are using Cloudflare CDN
Though it may take up to 48 hours to rebuild on Cloudflare’s network, still it is worth.
DELETE UNUSED PLUGINS
How many plugins do you use?
Do you know deleting unused plugins can improve your overall website performance? Many of us forget or intentionally keep unused plugins installed. But it hampers our site load.
So, have a thorough check-up of the plugins which you really need and delete the rest. Empty browser cache and check your webpage results.
USE CODES INSTEAD OF PLUGINS
Now, how many plugins do you actually need?
Plugins like Google Analytics, Social Media integration as twitter, facebook can be done through coding itself.
You can use a plugin for static cache content. You can do the very same thing by editing your htaccess file as stated in Leverage Browser Cache.
Or you can add code in htaccess
ExpiresDefault “access plus 8760 hours”
Do not unnecessarily put weight-age on your web server by adding numerous plugins. Instead do the work yourself by minor editing of func.php or htaccess files.
Warning! Copy the original files separately before editing function.php or htaccess. As minor mistakes can mess up your site.
PURGE CACHE IN CLOUDFLARE
If you are using CloudFlare then perform a ‘Purge Everything‘.
It will delete the HTML copies stored and rebuilt the pages. If you have made any CSS, JS changes before headers expire then by purging cache it will immediately reflect the changes.
Cache purge will Immediately purge all cached resources for your website. This will force CloudFlare to expire all static resources cached prior to the button click and fetch a new version~ Cloudflare
Login to Cloudflare> Select your Domain> Caching
So this is what I got after doing the changes.
I AM OFFERING A FREE COURSE TO INCREASE WEBSITE SPEED BY 70%
It is highly recommended to use a powerful cache plugin and a CDN network. Use an image optimizer if you use several images in your site.
Find out all the other factors which affect page delay.
TTFB will be drastically reduced if you use a dedicated hosting server. But using a dedicated server will involve with much higher rates. So if you have just started with your site or do not wish to increase your monthly expense then you can surely omit to change your hosting type (Though it is commended) and still manage to get time to the first byte within 500 – 700 ms.