Measure full page size in Chrome DevTools

倾然丶 夕夏残阳落幕 提交于 2019-12-22 01:33:04

问题


I've been googling for some time but haven't found any clear solution for this.

I want to measure full webpage weight / size (all doucment + scripts + fonts + styles etc.). I know the network tab in the devtools has size/content - but I want to have it summed (and not sum it every time).

I've been looking for chrome.devtools.* API but haven't found anything straight-forward.

Do you have some ideas how to achieve that?


回答1:


In the Network tab, make sure 'Disable cache' is checked and then when you load a page, look at the bottom panel for the total transfer size. See screenshot below:

The individual sizes are rounded, but the total at the bottom uses the byte size, which you can see in the HAR. The total then is rounded for display. If you find a slight mismatch between summing the individuals and the total shown by DevTools, that is the reason.



来源:https://stackoverflow.com/questions/38239980/measure-full-page-size-in-chrome-devtools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!