简体   繁体   English

我如何在一个html页面中获取包含的所有文件的总大小(递归为css文件)?

[英]how can i get the total size of all files contained (recursively for css file )in one html page?

all. 所有。

for the given page, say "http://www.yahoo.com", how can i calculate total size for the downloaded files, for example img files, javascript files, and css files? 对于给定的页面,说“ http://www.yahoo.com”,我如何计算下载文件(例如img文件,javascript文件和css文件)的总大小?

I know the htmlparser jar, but this does not support element for css file. 我知道htmlparser jar,但这不支持CSS文件的元素。

As Graeme mentioned, both the Firebug add-on for Firefox (a great tool for web developers btw) and the developer tools in Chrome will give you the info you want. 正如Graeme所述,Firefox的Firebug插件(btw是Web开发人员的好工具)和Chrome中的开发人员工具都将为您提供所需的信息。

However if you dont want to download anything you can use this online service: 但是,如果您不想下载任何内容,则可以使用此在线服务:

http://www.websiteoptimization.com/services/analyze/ http://www.websiteoptimization.com/services/analyze/

And this will tell you how much is downloaded in bytes for a webpage, including images, style sheets, scripts and everything else. 这将告诉您网页的下载量(以字节为单位),包括图像,样式表,脚本和其他所有内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM