Hacker News new | ask | show | jobs
by doodlesdev 1128 days ago
Tangential, but, this has to be one of the fastest websites I've used recently. How is it possible they get such fast loading of static content? It's basically instantaneous, specially with JavaScript disabled.

edit: Oh well, after navigating to some pages on the blog I see that everything was already on browser cache, so that's why it was so fast. Reminds me I need to overwrite Netlify's cache-control on my website, even though it's already very fast to load (Netlify sets max-age=0, must-revalidate by default).

3 comments

From experience, static websites on https://pages.dev are blazing fast (and free); ex: pagespeed result for a static webpage I host: https://archive.is/PkZbO

Netifly was equally fast (not free).

Cloudflare is indeed absurdly fast. I haven't been impressed with Netlify's speed, although I am using the free plan (don't think it makes sense to upgrade if I'm already not super happy with performance).

When you say paid Netlify is as fast as Cloudflare do you mean the Pro plan or the Enterprise plan? AFAIK the enterprise plans run on a different network, with more distributed servers, although I could be wrong.

It seems at least part of the noticed difference in speed has to do with my region, as pagespeed insights gives me sub-second FCP and LCP on my Netlify website [0], which feels a bit better than what I get at home (with 500mbps fiber). It's possible my ISP is at fault, but I'm not sure how I could diagnose this much better.

[0]: https://archive.ph/IF0t5

> When you say paid Netlify is as fast as Cloudflare do you mean the Pro plan or the Enterprise plan?

I was on their £19/mo plan, not Enterprise. And those websites were as fast as the ones on pages.dev.

Its use of the Cloudflare cache seems to be a part of it
Indeed, http headers indicate that the asset policy for the HTML is:

   cache-control: public, max-age=0, must-revalidate
A few things I notice:

   - It uses Cloudflare cache (as you pointed out).
   - All CSS is in the HTML file, so only one request is needed to display the page.
   - The compressed webpage is reasonably lean considering it has all CSS in the same file and uses Tailwind.
I've been playing with static content generation with Deno+Lume and deploying to Cloudflare pages... crazy good loads.