如下圖所示:
network底部有1.1 MB transferred over network和5.1 MB resources loaded by the page. 這兩個大小有何差別?

有中文部落格介紹說transferred over network是通過網絡加載的資源尺寸,而resources loaded by the page不僅包含前者,也包含直接從浏覽器緩存裡加載的資源尺寸。這種說法不完全準确,更精确的說法是,resources loaded by the page統計的是前端頁面加載的所有資源經過解壓之後的原始大小。
如圖,在打開Chrome開發者工具的Use Large request rows選項, 就能顯示出經過網絡加載資源壓縮過後的原始大小,如下圖所示:
以上說明來自Google官網:
https://developers.google.com/web/tools/chrome-devtools/network/reference#uncompressed https://stackoverflow.com/questions/56043151/what-is-the-difference-between-transferred-and-resources-in-chrome-devtools