3

My WordPress website is connected to Cloudflare CDN. It runs quite smoothly as of now. The site speed is quite good in general.

However, when I load the website for the first time after like 10-15 minutes from a Chrome incognito browser tab, it loads around 0.5- 1.5 seconds slower. But after that whenever I visit by re-opening a new incognito tab, it loads fast. Again, when I visit after 10-15 minutes interval, it will load slower in the first attempt. But is fast in consecutive attempts.

The same thing I noticed in my phone's Chrome browser.

Why does it take this extra time to load and how can I improve it?

Thanks!

1
  • "But after that whenever I visit by re-opening a new incognito tab, it loads fast" - To clarify, you have closed the previous incognito session (all tabs and windows)?
    – MrWhite
    Sep 7 at 22:07
4

Chrome's incognito window uses a fresh cache, so you could say that Chrome has two caches - a "normal" cache and an "incognito" cache. When you close ALL incognito windows and tabs, the incognito cache gets cleared. With default Chrome settings, the normal cache persists across windows and browsing sessions.

It takes extra time for your site to load in incognito because your browser is re-downloading a lot of the page's resources that it would otherwise have already cached, because it's working with a fresh incognito cache.

You can improve load times for repeat visitors by making sure your site's resources are being served with long-life cache headers where appropriate, so the browser won't re-download them for a long time.

You can improve load times for first-time visitors by making sure your site's resources are lean, so don't include tons of JavaScript, images, or other things that slow down page load - or load them on demand with e.g. the loading="lazy" image attribute or async and defer JavaScript attributes. This may come down to going lean on plugins.

You can improve load times for both by making sure your server hardware is fast (i.e. not on over-provisioned shared hosting) and your server software is lean (e.g. not bogged down by too many plugins).

2
  • 1
    I'm not sure what CloudFlare's CDN caching policies are, but I'd also assume it would be reasonable for edge nodes to have to fetch documents every 15 minutes. It might have to do with the if modified since headers that the documents send. Sep 6 at 18:09
  • @StephenOstermiller I use Cloudflare a lot, that is reasonable. Sep 7 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.