How to identify website slowness and fix it

There are several tools to help you identify your website speed. A word of caution: not all tools necessarily test for website slowness. For example while tools like PageSpeed Insights seem like they test website speed, they don’t. What they do instead is identify whether your website is actually implementing coding and optimisation best practices.

Of many tools there are two key ones that I use to identify website speed:

  1. Developer tools built-in to the browser
  2. WebpageTest.Org

Testing website speed with developer tools built-in to the browser

The built-in developer tools of the browser like Chrome, Safari, Firefox, etc. have a network tab which shows the size of each resource and the time it takes for each to load, including the overall page-load times. The catch is, a lot depends on the location from where you are trying to reach the website. This means network latency comes into play. Additionally, subsequent re-loads of the page will kick in the page caching. So you’ll need to disable browser cache while you test. You’ll also need to do several runs and identify key metrics to see what the pagespeed of your website is and what you are expecting.

Testing website’s page-load speed with WebpageTest.org.

WebPagetest is an open source project that is primarily being developed and supported by Google as part of their efforts to make the web faster. And this is what the results look like:

As you can see, webpagetest.org is not immune to the browser caching. The first-run shows a load time of 7.907 seconds whereas the repeat-run shows a load time of 1.797 seconds since the cache has kicked in. What’s key is the TTFB or the time to first byte which is 0.489 sec in the first-run and 0.556 sec. on the repeat-run.

TTFB or the Time-To-First-Byte

TTFB basically is the number of seconds the browser has to wait before receiving the first byte of the data from the website. This will tend to be unique for each instance regardless of caching. That’s because a lot of variables come into play when it’s about web-hosting server’s speed. It could be a fluctuation in server-load die to the number of visitors or the number of running processes, or even the server requiring to build the cache or fetch from the existing cache, network fluctuations etc. But for a more scientific approach I recommend doing about 10 iterations. And doing multiple test each of 10 iterations around various times of the day.

There’s been a lot of controversy surrounding the TTFB metric. Many CDNs (Content Delivery Networks) have contributed to the hype and many have declared the statistic as useless. However Wikipedia says:

TTFB is often used by web search engines like Google and Yahoo to improve search rankings since a website will respond to the request faster and be usable before other websites would be able to.

That should put speculations to rest. TTFB more often than not is a key indicator of your web-hosting server’s performance and can majorly contribute to website slowness as it even has major implications for your website’s SEO score.

Identifying whether the problem is with website or the hosting

There is one single key factor that contribute to site website’s speed — the amount of data on the page that has to be sent to the browser. This issue should be the first one to be addressed before you even think about better hosting.

Better hosting can do only so much.

If your page has data that takes 20 seconds to transfer, fast hosting or slow hosting will only contribute roughly a few seconds (roughly not more than upwards of 2 seconds). And no matter how much you spend on a premium hosting, it’s not going to solve the problem created by a poorly-behaved website. It’s thus important to address this issue first.

Pagespeed Insights is a great tool that tells you how much resource-hogging a website is.

Some of the most common things that you can fix yourself is:

  1. Images

    Images often are the only element that contribute to the bulk of the data on a webpage. Text etc. is all mostly sent in compressed form but images can’t be (image compression doesn’t drastically reduce the data-size of the image). It’s important that the images be the right size, are optimized for the web.

  2. Videos, sliders, ads and other scripts

    Video players, sliders, ads and other scripts contribute to the slowness by including bloat and also by doing a lot behind the scene which impacts the time to render the page usable. Sometimes that browser just waits for the slider, video or the ads to be ready before they kick in. There are scripts like the ones required for rendering the social-media buttons etc. which stall the rendering of the webpage. Somewhere you have to strike a balance. Get rid of the ads I say. These days ads are blocked by more than 70% of the visitors using ad-blockers. Whatever little that you earn from ads can be more than made up for by giving your visitors a better user-experience and converting more visitors into clients.

  3. Issues that fall into the developer’s realm

    Other than the above there are other things which are more for the developer to fix. Things like configuring a good caching plugin, minifying and combining scripts are things that are tricky and can break the website design if not configured correctly.

The benefits of a professional hosting

A professional hosting addresses a lot more issues than just website slowness. Here are some:

  1. Blazing fast website speed: Better TTFB is achieved with a proper configuration of web-server application, caching, resource optimisation.
  2. Less downtime: I mention “less” because no hosting provider claims a 100% uptime. But a good web host will provide a service uptime of 99.9% or more which is suitable for non-mission-critical websites.
  3. Automated backups: Backups are critical. But often this is realized when a back up is missing. In short, don’t wait for a disaster to happen before you opt for fool-proof backups.
  4. Free SSL: SSL are not only about securing the data transfer and preventing data-snooping and man-in-the-middle attacks. SSL (or HTTPS protocol) is today about user-experience as well as SEO. Major browsers show some kind of warning when visiting non-ssl websites. Form-submission functionality also is impeded as is the SEO ranking in major search engines. The more you wait the more customers you lose.
  5. Unlimited bloat: More often than not, the above is all you need from a professional web-hosting. However just like the megapixel war in cameras, it’s more about ticking more boxes when it comes to web-hosting. More of this and that is not necessarily better and will not do much for your website. Your website is perfectly fine without that branded assurance seal and a freemium security scan service. A proper web-host will by definition put security above all else and will be well-secured than coerce you to buy a security scan plan.

Which Hosting?

There are many web hosting service providers. A comparative review is beyond the scope of this article. However you need to make sure you go with the one which suits your own use case.

Do you want to be messing with MySQL, Cpanel, FTP etc.? If you do then there providers who give you access to Cpanel. Most of these are generic LAMP (Linux-Apache-MySQL-PHP) hosting and not optimized for any one purpose in particular.

If you don’t want to be messing with all that and are looking for peace-of-mind hosting then opt for a fully managed web-hosting provider. DezignBites provides fully-managed, set-it-and-forget-it premium hosting powered by Amazon’s Cloud Services. Of course there are other’s like Rainmaker, WP Engine etc. each with their own USPs.

In summary, website speed has a lot more to do with a poorly-coded website. Once that is addressed, it’s time to assess if you really need to address issues related to web-hosting. Premium web-hosting is a lot more than just a fast website. It’s about uptime, premium well configured and optimized hosting stack, quality of support, backups, ease of use and peace-of-mind.

For any issues pertaining to website slowness feel free to drop me a line. I’ll be more than happy to do a free audit and assist you in determining the future course of action.