Link to home
Start Free TrialLog in
Avatar of adiemeer
adiemeer

asked on

How to check the ticket time-out period of a cookie

Hello,

I am testing an application working with forms authentication and cookies. I have configured the next code in the web.config:

<forms name="FormsCookie" loginUrl="~/login.aspx" cookieless="AutoDetect" timeout="1" slidingExpiration="false"></forms>

If I browse to my application and logon I can see in Chrome (F12/Resources/Cookies) a cookie with the name FormsCookie. I I click this cookie I can see the Expires/Max-Age property. The value of this property is Session. How can I see the actual time of expiring (so for example 1:05 PM). I want to check this because I see that the forms cookie is still present after logging out, but I don't know how to check whether this cookie is still valid.

Regards,

Arne
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

The value of "session" means the cookie is valid until the browser closes.  The browser is responsible for clean-up at that point.  If you want the cookie to expire, set an expiration when you set the cookie.  The better alternative would be to forcefully expire (unset) the cookie on logout - something that should be happening anyways.
Avatar of adiemeer
adiemeer

ASKER

Thanks for your comment. But is it possible to check client side what the remaining time period is of a session?
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your time