以编程方式查找前1000个网站的页面加载时间 [英] Programatically find page load times for top-1000 websites

查看:47
本文介绍了以编程方式查找前1000个网站的页面加载时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我列出了前1000个网站。我想在浏览器中访问每个网站(渲染所有图像,执行所有javascript等)并记录加载时间。

I have a list of the top 1000 websites. I want to access each website in a browser (render all images, execute all javascript, etc.) and log the load time.

关于最佳方法的任何建议

Any suggestions as to the best way of doing this?

我考虑过使用无头浏览器,但不确定是否这是最好的方法。

I thought about using a headless browser, but not sure if this is the best way.

我知道Firebug有加载时间,但是我有1000个网站,此过程非常繁琐。另外,我还有两个参数需要调整,因此需要多次浏览1,000个网站。

I know Firebug has load times, but I have 1,000 websites and this process would be very tedious. Also, I have a couple of parameters to tweak so need to go through the 1,000 websites a couple of times.

推荐答案

如果我在执行此操作时,我将使用WWW :: Mechanize :: Firefox模块编写一个简短的Perl脚本来请求页面,并将页面加载时间记录到文件中。

If I were doing this I'd write a short perl script using WWW::Mechanize::Firefox module to request the pages, logging the page load times to a file.

< a href = http://metacpan.org/pod/WWW%3a%3aMechanize%3a%3aFirefox rel = nofollow> http://metacpan.org/pod/WWW::Mechanize::Firefox

这篇关于以编程方式查找前1000个网站的页面加载时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆