PageSpeed Insights - Drupal 優化筆記 - Core web vitals


今天看到Google的技術影片,用台語介紹Web Vitals,以點餐的方式,淺顯易懂的把Google網站核心指標Core web vitals(LCP、FID、CLS) 介紹的很清楚,於是我也認真的來解決長久以來,我的站在Google Search Console的分數不佳的問題



nginx 啟用文字壓縮

gzip on;

gzip_disable "msie6";

gzip_vary on;

gzip_proxied any;

gzip_comp_level 6;

gzip_buffers 16 8k;

gzip_http_version 1.1;

gzip_types application/javascript application/rss+xml application/vnd.ms-fontobject application/x-font application/x-font-opentype application/x-font-otf application/x-font-truetype application/x-font-ttf application/x-javascript application/xhtml+xml application/xml font/opentype font/otf font/ttf image/svg+xml image/x-icon text/css text/javascript text/plain text/xml;

參考:https://www.drupaldump.com/enable-gzip-nginx-enable-text-compression


Advanced CSS/JS Aggregation

設定就直接參考:https://www.drupal.org/docs/contributed-modules/advanced-cssjs-aggregation/advanced-aggregates

我設定完後,PageSpeed Insights桌機版有辦法達到80幾分,不過手機版只能到40幾分(不過我的手機有amp :) )

CLS的問題,暫時還是無解



留言

熱門文章