Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : J2EE : JSP : How to count the number of Users visited by Website Signup · Login
Author Thread
How to count the number of Users visited by Website
Posted in tutorial: Installing, Configuring, & Running Tomcat 6.0 Servlet Container on Microsoft Windows, and Developing & Running your first JSP Page
·  dilipchand_nlv
User
Joined: 17 Jul 2004
Total Posts: 2
How to count the number of Users visited by Website
Posted: 17 Jul 2004
How to count and display the number of users visited my home page without using database or sessions?
·  Faisal Khan
AdminAdminAdminAdmin
Joined: 24 Sep 2002
Total Posts: 547
Re: How to count the number of Users visited by Website
Posted: 25 Oct 2007
Okay, good question. Although I usually suggest folks to ask questions irrelevant to the topic of the tutorial, in the forum; I make an exception for you.

One technique that I use on Stardeveloper.com underneath is to use a client IP address and the hash code of the "User-Agent" header sent by the client to uniquely identify a user. I use a session time out of 30mins to time out a session. If a user from the same IP and User-Agent sends another request before 30mins have elapsed from his previous request, I simply update the 'lastAccessedOn' variable to the current date/time. Then a user will have another 30mins to send a request to keep his/her session alive.

Faisal Khan.
Stardeveloper.com

Users Who Have Visited This Thread In Last 24 Hours
8 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.