久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

跟蹤當前在線用戶的最佳方式

Best way to keep track of current online users(跟蹤當前在線用戶的最佳方式)
本文介紹了跟蹤當前在線用戶的最佳方式的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我要求我的網站始終顯示當前在線的用戶數量.例如,35741 個用戶當前在線".這不是基于登錄,而是基于當前有多少用戶在我的網站上.我已經嘗試為此使用會話開始/會話結束,但是會話結束并不可靠.因此,我得到了夸大的數字,因為我的會話開始添加數字但會話結束不會刪除它們,因為它不會觸發.

I have a requirement that my site always display the number of users currently online. For example, "35741 Users Currently Online". This is not based on a log in, simply how many users are currently on my site. I have tried using Session Start/Session End for this, however session end is not reliable. Therefore I get inflated numbers, as my session start adds numbers but session end doesn't remove them because it doesn't fire.

無需從中收集其他信息(報告等),只是要求顯示數字.非常簡單的請求變成了一筆巨大的交易.任何幫助表示贊賞.

There is no additional information to be gathered from this (reporting, etc), it's simply requested that the number show up. Very simple request that's turning into a huge deal. Any help is appreciated.

我應該說明我也嘗試過為此使用數據庫.包含會話 ID 和最后一個活動列的簡單表.每次點擊頁面時,我都會檢查會話是否在我的數據庫中.如果沒有,請插入.如果是,請更新活動時間.然后我運行一個程序來掃描數據庫,尋找在過去 20 分鐘內沒有活動的會話.這種方法似乎殺死了我的 SQL 服務器和/或 IIS.不得不重啟網站.

I should specify that I have also tried using a database for this. Simple table that contains a session ID and a last activity column. With each page hit, I check to see if the session is in my database. If not, insert. If so, update with activity time. Then I run a procedure that sweeps the database looking for sessions with no activity in the last 20 minutes. This approach seemed to kill my SQL server and/or IIS. Had to restart the site.

推薦答案

最好的方法和你一樣,但通過活動超時.如果給定的會話在 5 分鐘左右的時間內沒有訪問頁面,您可能會認為它們不再處于活動狀態.

Best way is like you do, but time it out via activity. If a given session doesn't access a page within 5 minutes or so, you may consider them no longer active.

這篇關于跟蹤當前在線用戶的最佳方式的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Is there a way to know if someone has bookmarked your website?(有沒有辦法知道是否有人為您的網站添加了書簽?)
Use of Different .Net Languages?(使用不同的 .Net 語言?)
Is there a C# library that will perform the Excel NORMINV function?(是否有執行 Excel NORMINV 函數的 C# 庫?)
Determining an #39;active#39; user count of an ASP.NET site(確定 ASP.NET 站點的“活動用戶數)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權列表中選擇 x 個隨機元素(無需替換))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創建時間表的摘要描述)
主站蜘蛛池模板: 日韩成人在线一区 | 在线免费激情视频 | 免费av电影网站 | 欧美一二区 | 91精品国产高清一区二区三区 | 午夜视频网站 | 精品综合在线 | 欧美精品一区二区三区在线播放 | 亚洲欧美日韩精品久久亚洲区 | 亚洲一区二区三区在线播放 | 日韩精品视频一区二区三区 | 久久久久国产一区二区三区四区 | 国产三区四区 | 日本不卡视频在线播放 | 99视频在线| 午夜免费影视 | 亚洲欧美视频 | 男人的天堂avav | 黄色网毛片 | 一区二区在线观看av | 毛片高清 | 国产 日韩 欧美 中文 在线播放 | 99精品久久久 | 在线国产精品一区 | 亚洲高清在线观看 | 人人澡人人射 | 国产黄色小视频 | 激情五月婷婷综合 | 日韩精品| 国产精品高潮呻吟久久 | 国产国产精品久久久久 | 国产精品免费一区二区三区 | 999国产精品视频免费 | 在线播放国产一区二区三区 | www久久久| 天天干天天干 | 国产久视频 | 亚洲国产成人久久久 | 亚洲一区二区三区视频 | 亚洲国产成人精品在线 | 中文字幕成人在线 |