Interaction để Tiếp theo Paint (INP)

Điều gì INP measures, đó ≤200 ms ngưỡng tại p75, vì sao điều này replaced FID trong 2024, và cách thực ra cách sửa một poor score — từ một SEO kỹ thuật.

Xuất bản lần đầu: 26 thg 6, 2026 · Cập nhật lần cuối: 8 thg 8, 2026 · Advanced
Ngôn ngữ

Interaction để Tiếp theo Paint (INP) là đó Cốt lõi Web Vital cho responsiveness. Điều này watches mỗi nhấp, tap, và keyboard interaction trên một visit và các báo cáo đó latency đó (close để) all of them nghĩ ra trong dưới — measured tại đó 75th percentile trong đó trường. Good là ≤200 ms, poor là >500 ms. INP replaced Đầu tiên Input Delay vào ngày 12 tháng 3 năm 2024, vì FID chỉ timed đó đầu tiên interaction input delay; INP measures đó đầy đủ latency (input delay + processing + presentation) of all of them. Bạn cách sửa điều này by breaking lên dài tasks, yielding để đó main chuỗi trao đổi, đang làm ít hơn trong event handlers, shrinking đó DOM, và taming bên thứ ba scripts. đây là một trường chỉ số — Total Blocking Time là của nó lab proxy.

Tóm tắt — INP là Cốt lõi Web Vital cho responsiveness. nó observes latency của all nhấp, tap, và keyboard interactions trên visit và các báo cáo giá trị tại 75th percentile (một outlier dropped theo 50 interactions) — không chỉ đầu tiên input như FID đã làm. interaction latency = input delay + processing duration + presentation delay. Good ≤ 200 ms, poor > 500 ms, judged on trường dữ liệu tại p75. nó replaced FID vào ngày 12 tháng 3 năm 2024 (FID fully đã xóa từ tools September 2024). khắc phục nó by breaking lên dài tasks, yielding để main chuỗi trao đổi với scheduler.yield(), đang làm ít hơn trong event handlers, shrinking DOM, và deferring thứ ba-party scripts. nó trường chỉ số — Total Blocking Time là lab proxy, và hai không luôn agree.

Điều gì INP measures — và Cách nó differs từ FID

Google definition là precise: INP “assesses a page’s overall responsiveness to user interactions by observing the latency of all click, tap, and keyboard interactions that occur throughout the lifespan of a user’s visit to a page.” (bản dịch) «assesses một trang overall responsiveness để người dùng interactions by observing đó latency of all nhấp, tap, và keyboard interactions đó occur throughout đó lifespan of một người dùng visit để một trang.»

Evidence for this claim INP observes click, tap, and keyboard interaction latency throughout a page visit rather than measuring only the first input delay. Scope: Current web.dev INP definition and qualifying interaction types. Confidence: high · Verified: web.dev: Interaction to Next Paint

Đó “all interactions… throughout the lifespan” (bản dịch) «all interactions… throughout đó lifespan» phrasing là đó toàn bộ story. INP là một visit-cấp độ chỉ số, không một load-time một — và Google reasoning là đó vast majority of một người dùng time on một trang happens sau điều này loads, so responsiveness during dùng matters hơn đó đầu tiên impression alone.

Đó contrast với Đầu tiên Input Delay là đó sạch nhất way để understand điều này: “FID only measured the input delay of the first interaction on a page. INP improves on FID by observing all interactions on a page, beginning from the input delay, to the time it takes to run event handlers.” (bản dịch) «FID chỉ measured đó input delay of đó đầu tiên interaction on một trang. INP improves on FID by observing all interactions on một trang, beginning từ đó input delay, để đó time điều này takes để chạy event handlers.» FID timed một điều về một interaction — đó chờ trước của nó handler đã bắt đầu — và đã bỏ qua cả hai cách dài đó handler ran và cách dài đó screen took để cập nhật. INP measures đó đầy đủ latency of mỗi interaction.

Một nuance worth getting right, vì nó phổ biến myth: INP là không theo nghĩa đen worst interaction. để tránh punishing trang cho single random spike, trình duyệt drops một outlier cho mỗi 50 interactions, sau đó các báo cáo giá trị tại 75th percentile của trang views. On thấp-interaction visit, đó lands on slowest interaction; on nặng một, couple của outliers nhận excluded đầu tiên.

Điều gì được tính as interaction là cũng hẹp hơn mọi người assume. chỉ clicks, taps, và keyboard presses là measured. Scrolling, hovering, và zooming là explicitly excluded. và single gesture có thể fire several events — tap produces pointerdown, pointerup, và click — mà INP groups as một interaction, không three. Trong đó group, INP takes longest riêng lẻ event duration, không sum của tất cả them — so fast pointerdown tiếp theo để chậm click vẫn các báo cáo as một interaction sized by chậm event. nếu trang có không qualifying interactions during visit, INP đơn giản không phải reported cho nó.

three parts của interaction latency

mỗi interaction latency breaks vào three sequential pieces. Đây là model để giữ trong của bạn head, vì mỗi part points tại khác khắc phục:

Interaction latency = Input delay + Processing duration + Presentation delay

  1. Input delay — time trước khi của bạn event handlers có thể ngay cả bắt đầu đang chạy, thường vì main chuỗi trao đổi là busy finishing dài task.
  2. Processing duration — time nó takes tất cả của bạn event handler callbacks để execute.
  3. Presentation delay — time từ Khi của bạn handlers finish cho đến khi trình duyệt paints tiếp theo frame on screen.

web-vitals attribution xây dựng exposes all three (inputDelay, processingDuration, presentationDelay) so Bạn có thể see mà part dominates on thực interaction. Theo Web Almanac 2024 dữ liệu, presentation delay là thường largest single piece tại median — nhưng processing duration là nơi optimization leverage thường lives, vì nó part đó balloons on poorly-được xây dựng các trang.

INP measures the whole interaction. Attribute the delay to the waiting, handler, or presentation phase before choosing a fix. Nguồn: web.dev

The interaction begins with input delay while the event waits for the main thread. Processing duration follows while the event-handler callbacks execute. Presentation delay runs from the end of the handlers until the browser lays out and paints the next frame. Together these three sequential phases make up the interaction latency measured by INP.

© Patrick Stox LLC · CC BY 4.0 ·

thresholds — và p75 trường caveat

RatingINP giá trịMeasured tại
Good≤ 200 ms75th percentile, trường
Cần improvement> 200 ms và ≤ 500 ms75th percentile, trường
Poor> 500 ms75th percentile, trường

Google Search Central trạng thái đó đích plainly — “an INP of less than 200 milliseconds” (bản dịch) «an INP of ít hơn 200 milliseconds» — và frames đó toàn bộ program as: “We highly recommend site owners achieve good Core Web Vitals for success with Search.” (bản dịch) «We highly khuyến nghị chủ trang web achieve good Core Web Vitals cho success với Tìm kiếm.» Đó 200 ms budget là genuinely tight khi bạn remember đó trình duyệt wants một frame mỗi ~16,7 ms tại 60 fps; all of của bạn handler hoạt động plus kết xuất có để fit.

Evidence for this claim INP is good at 200 milliseconds or less and poor above 500 milliseconds, assessed at the 75th percentile. Scope: Current web.dev INP thresholds for field measurement. Confidence: high · Verified: web.dev: Interaction to Next Paint

Vì sao INP là trường chỉ số (và lab dữ liệu không phải đủ)

Này là đó trap đó catches một lot of SEOs: một green Lighthouse score không có nghĩa là good INP. Nhưng “Lighthouse can’t measure INP” (bản dịch) «Lighthouse không thể đo lường INP» cần three tách biệt cases, không một, hoặc bạn’ll misread của bạn own tooling:

  1. MỘT tiêu chuẩn, noninteractive Lighthouse chạy các báo cáo không INP tại all. Điều này chỉ observes đó trang loading — điều này không bao giờ clicks, taps, hoặc types bất cứ điều gì — so có không interaction để time. Lighthouse falls lại on Total Blocking Time (TBT) as một load-time proxy thay vì. Google own cách diễn đạt: “Because TBT correlates well with INP, a page with a high TBT is a reasonable indicator that there may be high INP values during load.” (bản dịch) «Vì TBT correlates well với INP, một trang với một cao TBT là một reasonable indicator đó ở đó có thể là cao INP các giá trị during load.» Đó key words là “during load.” (bản dịch) «during load.» TBT says không có gì về an interaction đó goes bad ten seconds sau đó khi một lazy-loaded widget chạy — đây là một proxy, không bao giờ một substitute hoặc một conversion formula.
  2. MỘT manually hoặc synthetically exercised interaction — clicking một real button trong DevTools, hoặc scripting một nhấp trong một lab tool — làm produce một real INP-style latency number cho đó một interaction. đó là hữu ích cho reproducing một cụ thể bug. Nhưng đây là vẫn một scripted path on một device: điều này không thể stand trong cho đó trường mix of real devices, real người dùng, real interaction targets, và một đầy đủ visit worth of trang lifetime. As Google diễn đạt điều này, đó resulting giá trị “will be dependent on what interactions are performed during the measurement period,” (bản dịch) «sẽ là phụ thuộc on điều gì interactions là performed during đó việc đo lường period,» và real người dùng behavior là cũng variable cho một single lab chạy để represent điều này.
  3. Đó trường distribution là điều duy nhất INP thực ra là. đó là vì sao đó có thẩm quyền nguồn là trường dữ liệu: đó Chrome Người dùng Experience Báo cáo (CrUX), surfaced qua PageSpeed Insights và đó Search Console Core Web Vitals báo cáo. “Field data is the best source of information you can draw on when it comes to understanding which interactions are problematic for actual users.” (bản dịch) «Trường dữ liệu là đó best nguồn of information bạn có thể draw on khi điều này xuất hiện để understanding mà interactions là problematic cho thực tế người dùng.»

sử dụng lab (cases 1 và 2) để tìm và reproduce chậm interaction; sử dụng trường (case 3) để xác nhận liệu nó thực ra dragging xuống thực khách truy cập’ scores.

Vì sao của bạn INP score là poor

Gần như mỗi INP vấn đề traces lại để main chuỗi trao đổi là blocked Khi người dùng interacts. thông thường suspects:

  • Dài tasks. Bất kỳ main-chuỗi trao đổi task over 50 ms là một dài task; đó amount over 50 ms là của nó “blocking period.” (bản dịch) «blocking period.» Trong khi một chạy, của bạn interaction không thể là handled. Này là đó single biggest nguyên nhân.
  • Nặng event handlers. Đang làm cũng nhiều synchronously bên trong một nhấp/input handler inflates processing duration trực tiếp.
  • Lớn DOM size. Bigger DOMs cost hơn để render, mà inflates cả hai input và presentation delay.
  • Bên thứ ba scripts. Theo đó Web Almanac, consent providers, tag managers, analytics, và chat widgets là top offenders — và they hit ngay cả đơn giản nội dung các trang. họ là đó đầu tiên place I look on một trang I đã không xây dựng.
  • Post-load JavaScript. Chỉ vì một trang được kết xuất không có nghĩa là điều này finished loading — scripts evaluating sau đầu tiên paint có thể block sớm interactions.

Cách khắc phục nó

strategies, khoảng trong order của impact:

1. Break lên dài tasks. Google cốt lõi advice on handlers là để “do as little work as possible in them.” (bản dịch) «làm as little hoạt động as có thể trong them.» Split một big job vào nhỏ hơn tasks so đó trình duyệt có thể interleave một người dùng interaction. Khi tasks là hỏng lên, “the browser can respond to higher-priority work much sooner — including user interactions.” (bản dịch) «đó trình duyệt có thể respond để cao hơn-priority hoạt động nhiều sooner — including người dùng interactions.»

2. Yield để đó main chuỗi trao đổi. Đó modern, được khuyến nghị way là scheduler.yield() (Chrome 129+, Firefox 142+): await scheduler.yield() pauses của bạn code, lets đó trình duyệt xử lý pending hoạt động, và resumes với priority — so other tasks sẽ không cut đó line ahead of của bạn continuation. Đó classic fallback là setTimeout(..., 0), mà vẫn hoạt động nhưng gửi của bạn code để đó lại of đó task queue (và các trình duyệt enforce một 5 ms floor sau several nested calls). Một điều để dừng đang làm: isInputPending() — Google hiện tại says “we no longer recommend using this API.” (bản dịch) «we không lâu hơn khuyến nghị dùng này API.» See đó Scripts tab cho đó pattern.

3. Làm ít hơn trong event handlers — defer non-cốt yếu hoạt động. Chạy chỉ visual cập nhật tiếp theo frame cần synchronously; push mọi thứ khác (saving, spell-kiểm tra, phân tích, word được tính) behind requestAnimationFrame + setTimeout hoặc yield. người dùng sees phản hồi immediately; bookkeeping happens sau khi.

4. tránh layout thrashing. Reading layout properties right sau khi writing styles trong giống nhau task forces trình duyệt vào synchronous layout nó có thể nếu không có batched. Batch đọc, sau đó ghi.

5. Reduce DOM size. Nhỏ hơn trees render nhanh hơn. content-visibility có thể lazily render off-screen elements so họ không cost bạn during load hoặc interaction.

6. Audit và defer thứ ba-party scripts. Đây là highest-leverage SEO khắc phục on thực các trang. Load consent/tag/phân tích scripts lazily, gate them on interaction, hoặc move them off cốt yếu path. “lightweight” nội dung trang có thể fail INP purely vì của nặng embedded widget.

Làm INP ảnh hưởng thứ hạng?

Có — INP là một của three Core Web Vitals, và Core Web Vitals là part của Google trang-experience các tín hiệu. nhưng nó lightweight tín hiệu: tiebreaker giữa comparably relevant kết quả, không chính xếp hạng factor. không chase perfect INP score tại expense của nội dung và relevance.

Hai practical SEO points. đầu tiên, mobile là hard number. Trong 2024 Web Almanac, ~74% của mobile các trang đã truyền INP versus ~97% on desktop — và vì Google indexes mobile-đầu tiên, mobile hình là một đó được tính. thứ hai, phức tạp các trang làm tệ hơn: chỉ ~53% của top 1 000 các trang đã truyền, vì feature-rich các trang ship nhiều hơn JavaScript để block main chuỗi trao đổi. Nặng feature development là INP risk, và cao-interaction các trang — sản phẩm các trang, checkout, kết quả tìm kiếm, forms — là far nhiều hơn exposed hơn static nội dung.

INP so với FID — đầy đủ picture

FID (retired)INP (hiện tại)
Interactionsđầu tiên chỉAll, toàn bộ visit
Điều gì nó timesInput delay chỉInput delay + processing + presentation
Good ngưỡng≤ 100 ms≤ 200 ms
StatusĐã xóa từ tools Sept 2024Cốt lõi Web Vital since Mar 12, 2024

FID là đã biến mất — đã xóa từ Search Console on day INP launched và từ CrUX BigQuery/API by September 2024. nếu tool hoặc audit vẫn references FID, nó stale.

Các trường hợp biên đó làm INP dữ liệu disagree

MỘT handful of lifecycle quirks giải thích hầu hết “why doesn’t my RUM match CrUX” (bản dịch) «vì sao không my RUM match CrUX» các câu hỏi:

  • Không interactions, không INP. nếu visit không bao giờ nhận nhấp, tap, hoặc mấu chốt press — hoặc chỉ nhận excluded gestures như scrolling và hovering — có không INP giá trị cho đó trang view. Đây là thông thường on đọc-chỉ nội dung các trang và không phải bug trong của bạn monitoring.
  • Iframes count toward chỉ số, nhưng của bạn own JavaScript có thể’t see bên trong them. interaction bên trong embedded iframe ( quảng cáo, widget, embedded form) contributes để trang INP. nhưng đầu tiên-party RUM script có thể’t đọc events từ cross-origin iframe way trình duyệt own chỉ số có thể — so CrUX và giống nhau-origin RUM setup có thể legitimately disagree trên các trang với thứ ba-party embeds. Document điều này khoảng trống thay vì treating RUM/trường mismatch as bug.
  • Lại/forward bộ nhớ đệm restores reset INP để zero. trang pulled từ bfcache ( lại button, chẳng hạn) bắt đầu fresh INP count — interactions từ trước khi navigation away không carry over.
  • Dài-lived và backgrounded tabs vẫn cần để báo cáo. vì tab có thể sit open cho hours không có bao giờ formally unloading — especially on mobile, nơi OS có thể chỉ kill nó — INP nên là captured Khi trang becomes hidden, không chỉ on unload. RUM setups đó chỉ flush on unload sẽ silently lose dữ liệu từ những điều này visits.

nơi điều này sits

INP là một piece của Core Web Vitals picture, alongside Largest Contentful Paint (loading) và Cumulative Layout Shift (visual stability). kiểm tra nó trong PageSpeed Insights và Search Console báo cáo (trường), và debug nó trong Lighthouse / Chrome DevTools (lab, qua TBT proxy). dữ liệu behind tất cả nó xuất hiện từ CrUX.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.