简体   繁体   English

是否可以准确评估网页加载一千字节需要多长时间?

[英]is it possible to accurately assess how long it takes one kilobyte to load in a webpage?

我想知道是否有一种简单或实用的方法来确定网站上1 kB加载需要多长时间?

If you are using Firefox, you can get information on how long various files take to download using the Firebug plugin . 如果您使用的是Firefox,则可以获取有关使用Firebug插件下载各种文件所需时间的信息。 It has a bunch of network monitoring features. 它具有许多网络监视功能。

Chrome has a console similar to Firebug under tools->developer tools. Chrome在工具->开发人员工具下具有类似于Firebug的控制台。

This is great for a quick reality check when you are developing, but sometimes you need a little more. 这对于在开发时进行快速的现实检查非常有用,但有时您还需要更多。 For instance, you might want to set up a monitoring script to ensure response times aren't creeping up. 例如,您可能想设置一个监视脚本以确保响应时间不会增加。 Selenium is great for this and supports both Java and C# . Selenium对此非常有用 ,并且支持Java和C# Another option is to write a quick script using a headless browser like Mechanize ( Ruby , Perl ). 另一个选择是使用诸如Mechanize( RubyPerl )之类的无头浏览器编写快速脚本。

I prefer doing this kind of monitoring from the client end as opposed to on the server side because you get a more realistic perspective of what your end users are experiencing. 我更喜欢从客户端而不是服务器端进行这种监视,因为您可以更真实地了解最终用户的体验。

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

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