加载网页时的点击次数?

发布于 2024-11-30 10:38:35 字数 206 浏览 5 评论 0 原文

加载网页时,我想计算对服务器的点击次数(请求数和响应数)。例如,在加载 http://www.stackoverflow.com 时,它请求服务器的次数以及服务器的响应次数,我想要那个数。 谁能帮帮我吗?提前致谢。

编辑:谢谢你的回答.. 我想用java编写一个程序来完成这个任务。有什么帮助吗?

While loading a web page I want to calculate number of hits to the server(Number of requests and and number of responses). For example while loading http://www.stackoverflow.com how many times it requests the server and the number of responses form the server, I want that count.
Can anyone help me out please. Thanks in advance.

Edit: Thanks for yours answers..
I want to write a program in java to do this task. Any help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半衾梦 2024-12-07 10:38:35

许多浏览器附带的工具可以向您显示发送到特定服务器的所有请求和来自特定服务器的响应。在 Chrome 中,您可以在“查看”>“查看”下找到它。开发商>开发者工具。

另一种选择是使用 Wireshark 之类的工具来记录所有网络流量,然后允许您过滤到特定的网络流量主持人。

Ngrep 是wireshark 的命令行替代品。以下是查看所有相关请求的命令

ngrep -W byline -q "^(GET|POST).*stackoverflow"

有关 ngrep 和其他相关命令行工具的更多信息,请参阅 这篇文章

Many browsers come with tools that will show you all of the requests going to and responses coming from a particular server. In Chrome you can find it under View > Developer > Developer Tools.

Another alternative is to use a tool like Wireshark that records all network traffic, and then allows you to filter down to specific host.

Ngrep is a command line alternative to wireshark. Here's the command to see all the relevant requests

ngrep -W byline -q "^(GET|POST).*stackoverflow"

For more information on ngrep and other related command line tools see this post.

郁金香雨 2024-12-07 10:38:35

您可以使用 FireBug for Firefox 并查看在浏览器中打开该站点时对该站点发出的请求数。其他浏览器也有类似的工具。

You can use FireBug for Firefox and see how many requests are made to that site when you open it in the browser. Other browsers also have similar tools.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文