Is it possible to check when a cookie is due to expire? I have tried the following:
First I set three cookies:
<cfcookie name="test1" value="" expires="10" />
<cfcookie name="test2" value="" expires="never" />
<cfcookie name="test3" value="" expires="now" />
Then on another page I check the cookie data:
<cfset cookies = getPageContext().getRequest().getCookies()>
<Cfoutput>
<cfloop index="c" array="#cookies#">#c.getName()#:#c.getMaxAge()#<br>
</cfloop>
</Cfoutput>
However MaxAge
returns -1
for all cookies instead of the actual expiration date. How can I get the actual expiration date?