Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2007-02-13 : 06:59:47
|
Hi, I am using a table to record all the user activities on my website. Like if the user loggedIn, it store the date and time, same way if the user loggedOut, it store the date/time.Now if the user closed the browser without logOut, then how we can store the date/time in the same table. And also if the session is expired then how can handle the same situation.RegardsShaji |
|
Kristen
Test
22859 Posts |
Posted - 2007-02-13 : 07:15:48
|
Session expired you can probably handle in global.asa. Alternatively include the Session ID in the URL that the page "calls home" with. (and that target page can be session-less)We log each page. The last one in the list for the session is the time they left the site (excluding however long they took to read the page, or left it sitting on their browser!! which you can't really monitor).You could use a JavaScript event that will trigger when the page/site is navigated away from (don't know if that includes closing the browser), and have that call an page on your site to record the "went away time"Kristen |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-02-13 : 08:06:28
|
You can log the information when session expires by placing it in Session_End in global.asax but there is no simple way to do that when user simply closes the browser.Check this link for more information and JavaScript solution for the same:[url]http://www.asp101.com/articles/john/sessionsend/default.asp[/url]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
|
|
|