Trying to troubleshoot some timeout issues at a customer site. Is there a way to programmatically retrieve the cookie info and specifically the expiration value for logging purposes?
WWSESSIONID nITT97AhjLfaLiBS0 registration.spruillarts.org / 2020-03-12T06:21:23.720Z 28
Also, the default cookie lifespan appears to be 20 minutes. How do I override that?
Thanks
--stein
Depends on what the cookie is for.
If it's the session cookie that's controlled by the call to Process.InitSession()
and you can pass a timeout to that...
AFAIK you can't retrieve additional info about a cookie on the client - like when it expires or what restrictions are on it. That information is kept by the browser internally when the cookie is created but is not passed forward to the client side (or server side) code. You can see this if you examine the HTTP_COOKIE
variable which only gives you the key and value. And whether the cookie is available is based on cookie rules that the browser has approved.
+++ Rick ---
If it's the session cookie that's controlled by the call to Process.InitSession() and you can pass a timeout to that...
Ah, I had tried that, but I see now I also needed to pass in the 3rd parameter to force it to persist:
THIS.InitSession('WWSESSIONID', Config.nSessionTimeout,.T.)