Jump to content

Get time till Cookie Expires


ionik

Recommended Posts

Ok what i have is a session management script that handles user sessions store infromation in database and sets cookies for the current session

what i've run into is everytime a logged in user refreshes or visits a new page it updates the cookie information to set the lastactivity timestamp of the user

the problem i've run into is if the user has chosen to remain logged in their next visit when i re-set the userdata cookie the expiration time will be reset also and the is no way to determain if the user has chosen to remain logged in....

So is there any way to get the times that the cookie will expire or time until a cookie expires?

Link to comment
Share on other sites

Why don't you track their time in a DB instead of a Cookie?  I know I would delete any tracking cookies on my PC.

 

simple....reduce the number of queries needed when a page loads.....if i stored it in the db i would need a minimum of 2 queries ran just to get the info

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.