id-chalmers
12 years agoMentor
getting client cookies name and value
What is the best way to A: check that a cookie of name "cookie-a" has been set in the client, and B: to get the value and expiration of cookie-a? I can do this fairly easily with javascript (documen...
- 12 years ago
Hi,
this should work:
<#assign cookie = http.request.cookies.name.get("cookie-a") /> <#if cookie?? && cookie.value?? && (cookie.value == "value")> todo </#if>