Neova高级 SEO 平台

实验室数据或实际用户数据中的服务器响应时间较慢

在 Neova 中 开启 Lighthouse 设置后运行:它使用您 Mac 上的 Chrome。

规则最近审核:2026年10月17日 · 指南更新:2026年7月7日

服务器发送主文档第一个字节的时间较长,会延迟之后的所有内容。Lighthouse 会判定超过 600 ms 的实验室响应不通过。对于实际用户数据,web.dev 认为 TTFB 在 0.8 s 或以内为良好,超过 1.8 s 为较差。

您可以做什么

找出服务器上较慢的环节,例如数据库查询或页面生成,然后为 HTML 响应添加缓存或 CDN。

Neova 如何发现

Neova 对每类页面抽样运行速度测试。

Neova 为何标记

  • 在 HTML 的第一个字节到达之前,页面上什么都无法开始,所以服务器慢会推迟之后的每项指标。
  • Lighthouse 会判定实验室响应超过 600 ms 不合格;web.dev 把实测 TTFB 0.8 s 或更短算作良好,超过 1.8 s 算作差。
  • 网站响应缓慢时,Google 的爬虫也会降低抓取频率。

来源

生成的工单

这一部分目前只有英文版。

PE-022 · Server Response Time Is Slow in Lab or Field Data

How to Check the Fix: 1. Run the check again in Neova
2. Spot-check sample URLs across affected templates
3. Record the re-check date and period label next to the baseline

Neova writes this ticket for every affected page group and sends it to Jira, Linear, Asana and the rest, after you approve it.

完整指南

这一部分目前只有英文版。

What "Reduce Server Response Times (TTFB)" Actually Flags

This check measures Time to First Byte, the gap between the browser asking for your page and the first byte of the response arriving. It is pure server think time: DNS, connection setup, and above all how long your backend takes to build the HTML. Google's guidance puts a good TTFB under 0.8 seconds; Lighthouse flags anything meaningfully slower. A sluggish TTFB is a tax on everything downstream, because the browser cannot start parsing, painting, or loading a single other asset until that first byte lands.

The stakes: TTFB is the floor under Largest Contentful Paint (LCP). If the server sits idle for a second before responding, your LCP can never beat a second, no matter how well the rest of the page is optimized. Slow responses also drag down crawl rate.

A Real Failing Example (And the Fix)

The most common cause on dynamic sites is a page that runs uncached database work on every request. Here a homepage builds itself fresh for every visitor:

// Every request hits the DB, renders the template, then responds.
// Under load, TTFB climbs from 200ms to 2s+.
$posts   = $db->query("SELECT * FROM posts ORDER BY date DESC LIMIT 20");
$widgets = $db->query("SELECT * FROM widgets");   // repeated per request
echo render_template($posts, $widgets);

The fix is to stop doing that work on the hot path. Cache the rendered output (full-page cache) so most requests never touch PHP or the database at all, and serve it from memory or the edge:

// Serve a cached copy when it exists; only build on a miss.
$key  = 'home:v3';
$html = $cache->get($key);          // memory/object cache
if ($html === false) {
    $posts   = $db->query("SELECT * FROM posts ORDER BY date DESC LIMIT 20");
    $widgets = $db->query("SELECT * FROM widgets");
    $html    = render_template($posts, $widgets);
    $cache->set($key, $html, 300);  // cache 5 minutes
}
echo $html;

Better still, let a full-page cache or a CDN answer the request before it ever reaches your origin:

# Tell the CDN/edge it may cache this HTML briefly
Cache-Control: public, max-age=0, s-maxage=300, stale-while-revalidate=60

Where the Milliseconds Go

Cause of Slow TTFB Tell-Tale Sign Fix
No page cache Every hit runs full backend Full-page / object cache
Slow database queries TTFB spikes under load Index, cache, cut N+1 queries
Distant origin, no edge Far-away users slowest CDN with cached HTML
Underpowered / shared host Consistently high baseline Upgrade tier, tune PHP/opcache
Blocking third-party call TTFB tied to an API's health Cache or async the call

How to Detect It on Your Own Site

  1. PageSpeed Insights: the "Reduce initial server response time" audit at pagespeed.web.dev reports your measured TTFB and flags it against the 0.8s bar, using real-world field data where available.
  2. Lighthouse: the same "Initial server response time" audit runs in DevTools, giving you a repeatable lab number to test fixes against.
  3. DevTools Network panel: click the document request, open Timing, and read "Waiting for server response" (TTFB). Compare cold vs. warm loads to see if caching is doing its job.
  4. WebPageTest: the first row of the waterfall breaks TTFB into DNS, connect, TLS, and "Time to First Byte," so you can tell a slow backend from slow connection setup, and test from multiple locations to expose distance problems.

How to Fix It, Step by Step

  1. Measure a cold and a warm TTFB so you know your baseline and whether caching engages.
  2. Add full-page caching so repeat requests skip application code entirely; add object caching for the dynamic bits that remain.
  3. Profile the slow requests and fix the database, add indexes, kill N+1 query loops, cache expensive lookups. See server response time optimization.
  4. Put a CDN with edge caching in front so cacheable HTML is served near the user, not from a distant origin.
  5. Cache or make asynchronous any blocking third-party API call in the request path.
  6. If the baseline is still high on a warm cache, the host itself is the bottleneck, upgrade or tune the stack (PHP version, opcache, memory).

FAQ

What Is a Good TTFB Number?

Google treats under 0.8 seconds as good and flags noticeably higher. Fast sites often land well under 200ms on a warm cache. Treat 0.8s as the line you should be comfortably beneath, not a goal to just barely clear.

Is TTFB a Core Web Vital?

No, TTFB is a diagnostic metric, not one of the three Core Web Vitals. But it feeds straight into LCP, so a bad TTFB quietly fails you on a metric that is counted. See the TTFB too slow guide for the connection.

Will a CDN Alone Fix Slow TTFB?

Only if the CDN actually caches your HTML. If every request still falls through to a slow origin, the CDN just adds a hop. The win comes from serving cached responses at the edge; an uncacheable dynamic page needs the backend fixed too.

My TTFB Is Fine Locally but Slow for Real Users. Why?

Usually distance and load. Test from multiple WebPageTest locations, faraway users pay for the round trip to a single origin, which edge caching solves, and check whether TTFB degrades under concurrent traffic, which points at missing caching or an undersized host.

Does Slow TTFB Affect Crawling?

Yes. Persistently slow responses can lower how aggressively Google crawls you, and outright timeouts read as 5xx server errors. Keeping TTFB low protects both speed and crawl budget.

在您自己的网站上找到它

Neova 在每次抓取时都会运行此检查项和其他所有检查项,然后把修复方法写成工单交给您的团队。

  • 适用于 Mac、Windows 和 Linux 的桌面应用
  • 全部 696 项检查,每项都附来源
  • Search Console 和 Analytics 4,以只读方式连接
  • 工单发送到 Jira、Linear 和 Asana

下载 Neova Desktop Free 套餐,或免费试用 Solo 14 天,无需银行卡。

全部性能检查 · 指南 · 检查项库

作者:Neova Labs · 返回检查项库