Keep in mind, this method is just a helper, you still have full access to use the .net framework to create any cookie you want. From reviewing the code, it looks like the core used the helper for its own purposes and exposed it so others could use it in their xslt. Now with razor if you need more control just .net HTTPCookie: http://msdn.microsoft.com/en-us/library/system.web.httpcookie(v=vs.100).aspx
I would love to work on a project just to get something helpful added but I'm not sure this would be worth spending the time on. Seems kind of like reinventing the wheel.
SetCookie Question
Hi Everyone!
I am using the following line of code in my solition: -
<xsl:value-of select="umbraco.library:setCookie('basket', $newBasketString)"/>
Question, when will this cookie expire? how can I set a 24 hour timeout on this cookie?
Thanks in advance
Regards
Dean
Hi,
Looking at the code, you can't. It expires in 1 month by default, I didn't see an option to change that.
HTH,
Peter
Hi Dean,
Just had a quick look through the source code, and the expiration is set to one month:
and you don't have the option to change it via parameters - unfortunatly.
- Morten
I would like to see expiration too.
Is this something which would be considered as an update maybe for V5 ;)
Ideally I would love...
Name, Value, Expires, Path, Domain, Secure, Raw
This would make me very very very very very happy.
Lau
I think this topic should be alive again for v4.8+ :)
Agree?
Kind regards
Anders
Agreed.
Agreed !
Hello, I've created a ticket in YouTrack for this, comments/thoughts welcomed :)
http://issues.umbraco.org/issue/U4-2267
Also, I have no idea why I included RAW on the post above?
Keep in mind, this method is just a helper, you still have full access to use the .net framework to create any cookie you want. From reviewing the code, it looks like the core used the helper for its own purposes and exposed it so others could use it in their xslt. Now with razor if you need more control just .net HTTPCookie: http://msdn.microsoft.com/en-us/library/system.web.httpcookie(v=vs.100).aspx
I would love to work on a project just to get something helpful added but I'm not sure this would be worth spending the time on. Seems kind of like reinventing the wheel.
is working on a reply...