Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
cookie |
Fri, Jun 19 2015 5:40 AM | Permanent Link |
Ronald | Hi,
I am trying to write a cookie that is not session only with: Cookies.Set('cursus',cbActive.Value,6000,'/','localhost',false); That works fine until I close the browser. I presumed that the MaxAge parameter defines the lifetime in seconds. What am I not understanding? Greetings, Ronald |
Fri, Jun 19 2015 6:04 AM | Permanent Link |
Matthew Jones | Ronald wrote:
> That works fine until I close the browser. I presumed that the MaxAge > parameter defines the lifetime in seconds. Hmm, the framework code is like this: if (MaxAge >= 0) then TempCookie:=(TempCookie+'; max-age='+IntToStr(MaxAge*24*60*60)); which implies days I think? So it should still be there. I'd ponder if you need the domain, given it is specific to the computer, but I've not used cookies (I use localstorage). But you are down to the normal javascript cookie use here, so pages like this will give lots of clues: http://stackoverflow.com/questions/1458724/how-to-set-unset-cookie-with-jquery -- Matthew Jones |
Fri, Jun 19 2015 9:55 AM | Permanent Link |
Ronald | The problem could indeed be in the MaxAge in the manual it says:
....the MaxAge parameter specifies the length of time, in seconds.. But I have not tested it, because you gave me a good idea (as usual) about the localstorage. I tried that and it works great. "Matthew Jones" schreef in bericht news:82C2AF96-48EF-4596-B977-463A16D39157@news.elevatesoft.com... Ronald wrote: > That works fine until I close the browser. I presumed that the MaxAge > parameter defines the lifetime in seconds. Hmm, the framework code is like this: if (MaxAge >= 0) then TempCookie:=(TempCookie+'; max-age='+IntToStr(MaxAge*24*60*60)); which implies days I think? So it should still be there. I'd ponder if you need the domain, given it is specific to the computer, but I've not used cookies (I use localstorage). But you are down to the normal javascript cookie use here, so pages like this will give lots of clues: http://stackoverflow.com/questions/1458724/how-to-set-unset-cookie-with-jquery -- Matthew Jones |
Sat, Jun 20 2015 7:29 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Matthew,
<< which implies days I think? >> Yeah, that's a bug - I've changed it in both EWB 1.x and 2 and will have a new EWB 1.x build out after 2 is released on Monday. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |