在线用户数量 [英] Number of Online users

查看:74
本文介绍了在线用户数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是
我需要在我的网站上显示在线用户数。

请帮助我。

谢谢!

Hello,
I need display number of on-line users in my site.
Please help me.
Thanks!

推荐答案

简而言之,你没有。  您无法保证知道用户何时关闭其浏览器窗口。   HTTP本质上与"在线"概念相反。  用户要求提供一个页面,他们会获得该页面,只要他们从你那里获得该页面,他们就不再"在线"了。从服务器的角度来看,直到他们要求另一页。
In short, you don't.  You have no guaranteed way of knowing when a user closes their browser window.  HTTP is inherently contrary to the concept of being "online".  A users asks for a page, they get the page, and as soon as they finish getting the page from you they are no longer "online" from the server's perspective, until they ask for another page.


这篇关于在线用户数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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