Google PageSpeed Insights API 回報欄位整理

PageSpeed Insights API是什麼?

PageSpeed Insights API是由Google提供,可以藉由代碼檢測網站速度的工具。該工具基本上就是PageSpeed Insights的api版本,除了提供chrome的使用者實際體驗分數之外,連帶lighthouse的研究資料也連帶涵蓋其中。

該如何使用PageSpeed Insights API?

執行該api前大概有幾項前置動作:
1.建立Google cloud platform帳號
2.在帳號中建立專案
3.在專案中啟用PageSpeed Insights API

4.前往權證中獲得API 金鑰(key)

之後再參考PageSpeed Insights api get started的官方範例,就可以容易使用這項API了

PageSpeed Insights api項目一覽

過去實際使用了一下,發現光是回報的json格式程式碼就多達8000多行,為了方便尋找對應的項目,己見室將Google在PageSpeed Insights計分較重的幾個項目整理成表格紀錄。

主項目相關子項目內容說明文件
first-contentful-paintfirst-contentful-paint首次內容繪製https://web.dev/first-contentful-paint/
server-response-time伺服器回應時間https://web.dev/time-to-first-byte/
render-blocking-resources阻擋渲染的資源https://web.dev/render-blocking-resources/
redirects重新導向https://web.dev/redirects/
critical-request-chains關鍵請求鏈https://web.dev/critical-request-chains/
uses-text-compression使用文字壓縮https://web.dev/uses-text-compression/
uses-rel-preconnect使用 rel=preconnecthttps://web.dev/uses-rel-preconnect/
uses-rel-preload使用 rel=preloadhttps://web.dev/uses-rel-preload/
font-display字型顯示https://web.dev/font-display/
unminified-javascript未壓縮的 JavaScripthttps://web.dev/unminified-javascript/
unminified-css未壓縮的 CSShttps://web.dev/unminified-css/
unused-css-rules未使用的 CSS 規則https://web.dev/unused-css-rules/
total-blocking-timetotal-blocking-time總阻擋時間https://web.dev/lighthouse-total-blocking-time/
long-tasks長期任務https://web.dev/long-tasks-devtools/
third-party-summary第三方摘要
third-party-facades第三方外觀https://web.dev/third-party-facades/
bootup-time啟動時間https://web.dev/bootup-time/
mainthread-work-breakdown主執行緒工作細分https://web.dev/mainthread-work-breakdown/
dom-sizeDOM 大小https://web.dev/reduce-the-scope-and-complexity-of-style-calculations/
duplicated-javascript重複的 JavaScript
legacy-javascript過時JavaScripthttps://philipwalton.com/articles/deploying-es2015-code-in-production-today/
viewport視窗https://developer.chrome.com/blog/300ms-tap-delay-gone-away/
largest-contentful-paintlargest-contentful-paint最大內容繪製時間https://web.dev/lighthouse-largest-contentful-paint/
server-response-time伺服器回應時間https://web.dev/time-to-first-byte/
render-blocking-resources渲染阻塞資源https://web.dev/render-blocking-resources/
redirects重新導向https://web.dev/redirects/
critical-request-chains關鍵請求鏈https://web.dev/critical-request-chains/
uses-text-compression使用文字壓縮https://web.dev/uses-text-compression/
uses-rel-preconnect使用 rel=preconnecthttps://web.dev/uses-rel-preconnect/
uses-rel-preload使用 rel=preloadhttps://web.dev/uses-rel-preload/
font-display字型顯示https://web.dev/font-display/
unminified-javascript未壓縮的 JavaScripthttps://web.dev/unminified-javascript/
unminified-css未壓縮的 CSShttps://web.dev/unminified-css/
unused-css-rules未使用的 CSS 規則https://web.dev/unused-css-rules/
largest-contentful-paint-element最大內容繪製元素https://web.dev/lighthouse-largest-contentful-paint/
preload-lcp-image預載最大內容繪製圖像https://web.dev/optimize-lcp/#preload-important-resources
unused-javascript未使用的 JavaScripthttps://web.dev/unused-javascript/
efficient-animated-content高效動畫內容https://web.dev/efficient-animated-content/
total-byte-weight總位元組重量https://web.dev/total-byte-weight/
cumulative-layout-shiftcumulative-layout-shift累積版面移動https://web.dev/cls/
layout-shift-elements版面移動元素
non-composited-animations非合成動畫https://web.dev/non-composited-animations/
unsized-images未指定大小的圖片https://web.dev/optimize-cls/#images-without-dimensions
interactiveinteractive網頁反應時間https://web.dev/interactive/
speed-indexspeed-index網站速度分數https://web.dev/speed-index/

看完了這麼多,我想你對Google PageSpeed Insights API 已經有了一定的了解,如果喜歡我的文章,或是未來想要了解更多關於SEO的消息,請關注我的網站,我會努力將各種知識分享給各位:)

Last Updated on 26 2 月, 2024 by 己見室

取自日文「實驗室(じっけんしつ、jikkensitu)」,在自己的網站上做一些實驗性的修改、優化,同時將這份「自己的所見所聞」分享給所有人,在兩個想法的結合下「己見室」就這麼誕生了。 未來會持續以自身經驗、實際操作過的步驟,帶給各位SEO、數位行銷領域相關的優化方法,請各位持續關注這個網站。

Comments

No comments yet. Why don’t you start the discussion?

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *