白話文解說網頁效能新指標 - INP

Interaction to Next Paint (INP) 指的是使用者與網頁互動(例如點擊)之後到下一個畫面完成的所需時間。

Google 預計在 2024 年 3 月全面使用 INP 取代 FID(First Input Delay), 這 2 者衡量的目標很類似,基本上都是衡量使用者與網頁互動的情況,不過 INP 衡量包含所有的互動,而 FID 只衡量第 1 次互動,而且 FID 計算的是互動開始到開始處理使用者互動之間的延誤(delay),所以假設 FID 越高,就代表你的網頁可能都在忙別的事,無法即時處理使用者的互動:

Where INP considers all page interactions, First Input Delay (FID) only accounts for the first interaction. It also only measures the first interaction’s input delay, not the time it takes to run event handlers, or the delay in presenting the next frame.

而且 INP 會在使用者離開網頁時才算出一個值做為代表,越低的值,代表你所做的網頁越可靠,能夠迅速回應使用者:

INP is calculated when the user leaves the page, resulting in a single value that is representative of the page’s overall responsiveness throughout the entire page’s lifecycle. A low INP means that a page is reliably responsive to user input.

如果你是一名前端工程師,或者有在關注 SEO 相關指標,那麼是時候提早關注網站的 INP 表現囉~

Interaction to Next Paint (INP)

追蹤新知

看完這篇文章了嗎?還意猶未盡的話,追蹤粉絲專頁吧!

我們每天至少分享 1 篇文章/新聞或者實用的軟體/工具,讓你輕鬆增廣見聞提升專業能力!如果你喜歡我們的文章,或是想了解更多特定主題的教學,歡迎到我們的粉絲專頁按讚、留言讓我們知道。你的鼓勵,是我們的原力!

贊助我們的創作

看完這篇文章了嗎? 休息一下,喝杯咖啡吧!

如果你覺得 MyApollo 有讓你獲得實用的資訊,希望能看到更多的技術分享,邀請你贊助我們一杯咖啡,讓我們有更多的動力與精力繼續提供高品質的文章,感謝你的支持!