99% UK visitors

The site is WordPress/WooCommerce based, hosted on an UpCloud server in London, and heavily image oriented with 100% of customers and 99% of site visitors in the UK.

Core pages and content have optimised Webp and SVG images only, but as its a classified advertising site I can’t expect the users to pay as much attention (if any), to minimising their own images.

Because of this the image upload workflow automatically rejects images over 5 Mb, reduces the rest to Max Width 1920 or Max Height 1068 pixels, converts all images to JPG. then smushes them with 82% (lossy) optimisation, offloads the resulting images to a Wasabi S3 server in Amsterdam (from where they are served), the original images being discarded in order to reduce server size and minimize backup costs.

The site is running on the Cloudflare Pro plan at the moment, and to be honest I have yet to see any great improvement in the site’s performance. So my question is this… which of the Cloudflare functions, features and optimisations would benefit the site, given the geographical focus and use case?

Can you provide an example image URL please?
But yes, in general CloudFlare not just speeds up the page, but also lowers costs you do have on your origin Server.

Sure, thanks for coming back to me.

The site is https://horseboxheaven.uk

Here’s a typical core page image…

https://hbh-cdn.horseboxheaven.uk/wp-content/uploads/2020/12/18181958/company-page-680x400-1.webp

and here’s a typical user generated image…

https://hbh-cdn.horseboxheaven.uk/wp-content/uploads/2021/01/17191658/IMG_0461.jpg

Hi,

Explain to me here, please, not on WhatsApp.

Terence.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.

Why do you think I would contact you via WhatsApp??

So I have inspected your Images and they all have “Cache: BYPASS”. So yes, configurating CloudFlare that it will Cache these images will speed up your site and lower the load (and cost) on your origin Server.

Sorry for the late repsonse!

1 Like

No problem Martin. And sorry for the crossed wire from me. I think that message was intended for someone else entirely. So I have checked out Cloudflare and I have the cache set to Standard and Eight Days, so do I have to set a rule as well, and if so what?

You can do this with a Rule (if it should just apply to a part of your zone/domain) or you can do it in the general settings.

I would even set it higher. I would set it to:

Edge Cache TTL: 1 month
Browser Cache TTL: 1 year

If anything changes you anyway flush the related cache.
After this recheck your headers and make sure it is cached at CloudFlare

OK, thanks, I have now set the Browser Cache TTL to 1 year in the Caching configuration, and I’ve set up a page rule for the site’s uploads where I set Browser Cache TTL to a day, Cache Level to Cache Everything and the Edge Cache TTL to a month.

I am now seeing…

curl -I https://hbh-cdn.horseboxheaven.uk/wp-content/uploads/2020/12/04195258/cropped-site-icon-512x512-1-100x100.png
HTTP/2 200 
date: Fri, 12 Feb 2021 14:02:10 GMT
content-type: image/png
content-length: 2237
set-cookie: __cfduid=d569075b67c76f3293f88d31a9c5079e71613138530; expires=Sun, 14-Mar-21 14:02:10 GMT; path=/; domain=.horseboxheaven.uk; HttpOnly; SameSite=Lax; Secure
cf-bgj: imgq:85,h2pri
cf-polished: status=not_needed
etag: "b0cb636bb53066a69b4a6300cabe6871"
last-modified: Mon, 14 Dec 2020 00:12:56 GMT
vary: Accept
x-amz-id-2: 5jEGvDB3HMFROGB3bkU2i6yBlha3dBaB++aO22HkopsSAdwS5kwo3XBAbKCI+KUcwziTGmeaj3vI
x-amz-request-id: 88E7702DF72E3B40
cache-control: max-age=31536000
cf-cache-status: REVALIDATED
accept-ranges: bytes
cf-request-id: 083825a8c300000877ab1b8000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?s=u4fvfXHDIVtc8MzUtyiULQn5MUcsydJLVanzltpBleg8rKnad8djyGGnXYGvHSBR01uu6wVn57FVMvnsE4r1QgMVDV4iiexSeYbGv%2BuaPnRVYN9V7Ye4PpjZ"}]}
nel: {"max_age":604800,"report_to":"cf-nel"}
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
server: cloudflare
cf-ray: 6206d8879af90877-CDG
alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400

Just request the same file again and

cf-cache-status: REVALIDATED

should switch over to

cf-cache-status: HIT

Thats it, now CloudFlare speeds up you images worldwide (on second request)

cf-cache-status: HIT

Many thanks.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.