Don't make visitors on your website wait for the same page twice

Summary: Are you sure your caching strategy is in order and that returning and successive visitors will benefit? This client found out that there are still a lot of performance gains to be made on the Time to First Byte (TTFB).

  • by Jordy Scholing
  • Published
  • Reading time ± 5 minutes
  • TTFB
Don't make visitors on your website wait for the same page twice

This client suffered from a high TTFB, which is something you don't really want to have already. On a unique pageview you often can't avoid having a somewhat higher TTFB, but this client had the lowest TTFB precisely on the unique pageview. We wanted to investigate this, together with the client. First some background information of this website and the necessary explanation.

How the TTFB should benefit from cache

Caching is a way for websites to store and reuse data that is accessed often. This speeds up load times and puts less stress on the server. The first request from a unique visitor makes the server send the content, which the browser stores in its cache. Returning visitors see faster load times because they don't have to ask the server for the same information again. With server-side caching, the server keeps a copy of popular content, which helps future visitors and further reduces response time.

  • Caching optimizes website performance by minimizing data transfer.
  • Enhances the user experience.
  • And reduces the bandwidth consumption.

What happend to the TTFB on their website?

When looking at the TTFB of a particular website, it is important to know what templates are available. In this case, we are dealing with a homepage, category page and product-detail page.

Knowing how high the TTFB is on these templates will help determine where more research is needed.time to first byte on the homepage, category page, and product-detail page

The screenshot above shows the metrics table that gives a nice overview by template. However, this is across all pageview types.

  • The category page has a TTFB of 2192 ms
  • The product-detail has a TTFB of 2098 ms
  • And the homepage has a TTFB of 439 ms

We now know that something is going wrong somewhere because we are seeing unusual values for the TTFB. The thresholds for the TTFB want you to stay under 800 ms. And we know it can do well because the homepage has an excellent TTFB.

TTFB by pageview type

For the next section, it is important to know that there are different types of pageviews, namely:

  • Unique Pageviews: Single count of visits to a specific webpage, disregarding multiple views by the same user.
  • Returning Pageviews: Visits to a webpage by users who have previously accessed it, indicating engagement or loyalty.
  • Successive Pageviews: Consecutive views of different pages within a website, reflecting user interest and content exploration.

Each of these pageview types uses cache (or not) in a different way. Where the successive user benefits the most and the unique the least.

TTFB by unique pageview

For a unique pageview the cache is not yet utilized, content fetched from the server, and stored in the browser cache for future use. This means that a unique visitor will always have a worse experience than a successive visitor.

However, here is where something strange happened for this customer. In fact, the unique pageview is better than that of a returning and successive on the category and product-detail page.

TTFB by pageview type

Let's break it down

There are happening several things, for example the TTFB is already quite high on the category and product-detail page, but the strange thing is that the unique pageview has a better TTFB.

To get a better idea of how the TTFB is structured, we can use the TTFB breakdown. This shows which part takes up the most time, and also allows for solution-oriented work. This is what the TTFB looks like by pageview type on the category page.

TTFB breakdown per pageview type

To understand this breakdown, it is helpful to understand the 4 different parts. You can find the definition of these terms in our Core Web Vitals glossary.

Core Web Vitals Glossary

150+ Terms and Abbrevations You Need To Know.

Go to the CWV glossary
RUMvision Core Web Vitals newsletter

So what is happening?

The breakdown and how this works is now a lot clearer, and perhaps as you read on you will understand better what is unusual here.

  • We see that the server response time for the successive visitor is incredibly high, indicating that caching is not being used.

This may be because there are several variants that cannot be loaded dor the cache. However, this is not the case in the case of this webshop.

Many people navigate to a 2nd, 3rd results page (pagination). And those pages are all uncached. This is where the high TTFB on the category page comes from.

But what does pagination have to do with this?

Good question and this does not always have to have anything to do with a TTFB, but in this case it does. When we navigate to or enter the category page, the TTFB is already very high (around 2 seconds), but even when we move to a next page within the category page, it remains high. This has to do with an element from the URL.

  • https://www.example.com/category/apples this is the category page, which makes sense.

But if I want to stay on the same category page, but for example to the next page for more products the following happens:

  • https://www.example.com/category/apples?p=2

Everything after the "?" is called a query string and provides dynamic content. In reality, the only thing that changes is the products, but the rest of the page is static. For this reason the successive pageview takes just as long as the first pageview on the category page.

To confirm this, we can add the "pageviewcount" filter. Here we see that no matter how many times the visitor clicks through, the TTFB always remains about the same and thus indicates that cache cannot be used.

What makes the unique pageview better?

The TTFB for the unique pageview is better because the cache can be utilized, this is because of the fact that the "fbclid" parameter is included in the caching strategy. People entering the website via a Facebook ad will benefit from cache, because our client has the "fbclid" parameter included in their caching strategy, because the content is the same (static).

So as long as someone only remains a unique visitor they will have a not as bad experience as the successive visitor has when this person wants to look around the website a lot.

And why is the successive so "bad"?

Now, if we change the pageview type filter of the screenshot above from unique to successive, we will see that the "p" parameter has a large share in the number of successive pageviews and thus the overall TTFB of the website.

Conclusion

Very brief, but definitely underrated. ALWAYS make sure that your caching is in order whenever possible and that it also benefits every visitor. After all, cache is so useful in allowing your visitors to have a better experience. So are you wondering if your website or webshop is fully utilizing caching? Then contact us and start your trial.

Share blog post