> When a cookie is set on a machine, how can I test for an 
> expiration date?
> 
> I have written the following which seems to test for my code 
> in a cookie, but do I need to test for it being expired or not?
> 
> <CFIF IsDefined("Cookie.ab_referer")>
>       <CFIF NOT Cookie.ab_referer CONTAINS "AID">
>               <cfcookie name="ab_referer" 
> value="cs_uri_stem#?#cgi.QUERY_STRING#"
> expires="45">
>       </cfif>
> <CFELSE>
>       <cfcookie name="ab_referer" 
> value="cs_uri_stem#?#cgi.QUERY_STRING#"
> expires="45">
> </cfif>
> 
> I have only certain cookies being set with the AID value in them.

You can't test for an expiration date from CF, as the browser doesn't send
that back to the server; it just sends the cookie itself up until the
expiration date. If the cookie has expired, the browser won't send it.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to