2 questions

Results 1 to 2 of 2

Thread: 2 questions

  1. #1
    Join Date
    Dec 1969

    Default 2 questions

    Hi all,<BR><BR> 1) Will a websever, by any chance, give the SAME session ID to different web browsers while the webserver haven&#039;t restarted?<BR><BR> 2) How can I expire a cookie while the session is time out? I think the default setting of cookie&#039;s expiration is already the time of a session time out... However, it seemed not work well... as I need to delete some records in a table where session ID is the key of the table.<BR><BR> Thanks.<BR><BR>Gilbert<BR>

  2. #2
    Join Date
    Dec 1969

    Default 2 Answers

    Answers <BR><BR>1.) No, session ID is always unique (thats the theory at least), but should always be unique.<BR><BR>2.) One way to acheive this, is to track the session around on every page, updating the records in the db to contain an end time of now(). Then, in the same routine, delete everything from that table that is say more than 30 minutes old. This is a little heavy on resources, but you may find its the only way to do this sort of thing, as the Session_OnEnd procedure doesn&#039;t fire unless you manually abandon the session!<BR>If you find a better way of doing this, let me know! <BR><BR>:-)<BR><BR>HTH<BR>D.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts