TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Speeding Up Your Website Using Cloudflare Cache

83 点作者 lilouartz9 个月前

7 条评论

pbowyer9 个月前
&gt; Serve Stale Content While Revalidating (Not Working as Expected)<p>&gt; This is the only thing that I was not able to figure out.<p>For good reason, because (at the last time I tried this earlier this year) Cloudflare documents stale-while-revalidate as if it&#x27;s supported [1], but it isn&#x27;t [2], [3].<p>Cloudflare instead has a different behaviour [4], [5] which helps in some circumstances but not all.<p>I use Fastly&#x27;s free CDN plan to get round this.<p>1. <a href="https:&#x2F;&#x2F;developers.cloudflare.com&#x2F;cache&#x2F;concepts&#x2F;revalidation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;developers.cloudflare.com&#x2F;cache&#x2F;concepts&#x2F;revalidatio...</a><p>2. <a href="https:&#x2F;&#x2F;community.cloudflare.com&#x2F;t&#x2F;support-for-stale-while-revalidate&#x2F;496788" rel="nofollow">https:&#x2F;&#x2F;community.cloudflare.com&#x2F;t&#x2F;support-for-stale-while-r...</a><p>3. <a href="https:&#x2F;&#x2F;community.cloudflare.com&#x2F;t&#x2F;when-will-cloudflare-fully-support-stale-while-revalidate-with-asynchronous-background-revalidation&#x2F;287764&#x2F;8" rel="nofollow">https:&#x2F;&#x2F;community.cloudflare.com&#x2F;t&#x2F;when-will-cloudflare-full...</a><p>4. <a href="https:&#x2F;&#x2F;kerkour.com&#x2F;cloudflare-stale-while-revalidate" rel="nofollow">https:&#x2F;&#x2F;kerkour.com&#x2F;cloudflare-stale-while-revalidate</a><p>5. <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;48124415&#x2F;does-cloudflare-support-stale-while-revalidate" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;48124415&#x2F;does-cloudflare...</a>
评论 #41354968 未加载
评论 #41351738 未加载
turtlebits9 个月前
Before adding complexity, try to make your web sites smaller!<p>I&#x27;m not a big fan of adding more complexity (infra and money) to improve performance.
评论 #41350395 未加载
评论 #41352787 未加载
评论 #41354798 未加载
评论 #41351164 未加载
评论 #41351170 未加载
arghwhat9 个月前
To use the cache you shouldn’t need to do any of this - just have appropriate cache headers.
daviding9 个月前
Some rough cost numbers of using this would be nice.
评论 #41350361 未加载
j459 个月前
Cloudflares free cache is pretty good as well.<p>Also have heard things like jscompress to reduce the number of calls on loading a page can go a long way too to boost speed.
wetimeai9 个月前
is is a quick fix. and for smaller websites i recommend it. However it has its limits and it can frustrate when you are developing. But in general yeah good free service.
taw12859 个月前
does this approach make sense for an app-router based nextjs app hosted on vercel?