New topic: 

session.cookies.set

<http://forums.realsoftware.com/viewtopic.php?t=43962>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        tigme          Post subject: session.cookies.setPosted: Fri May 
11, 2012 9:56 am                                 
Joined: Wed Aug 25, 2010 4:04 am
Posts: 17
Location: South Africa                Does anyone know the maximum amount of 
key value pairs that can be saved in cookies using 
session.cookies.set("label",stringvalue,expirydate)?

I have a form with approximately 70 value pairs of which only the last 50 
values are saved.

If this is the case is there an easy way to serialize your data and store it as 
one key/value pair in a cookie 
session.cookies.set("label",serialized_string,edate).      
_________________
Rudolph Thomas
TIGME.COM  
                             Top                Thom McGrath          Post 
subject: Re: session.cookies.setPosted: Fri May 11, 2012 10:11 am               
        Site Admin                
Joined: Tue May 06, 2008 1:07 pm
Posts: 1127
Location: Greater Hartford Area, CT                Well one thing to be aware 
of is the security of cookies. They aren't. They are user data and therefore 
cannot be fully trusted. Just like data received from a text field, for example.

Generally speaking, you should store your data in a database, and use a cookie 
to store some kind of identifier so you can find the right data later.      
_________________
Thom McGrath - @tekcor
Web Framework Architect, Real Software, Inc.  
                             Top                tigme          Post subject: 
Re: session.cookies.setPosted: Fri May 11, 2012 10:24 am                        
         
Joined: Wed Aug 25, 2010 4:04 am
Posts: 17
Location: South Africa                Thom McGrath wrote:Well one thing to be 
aware of is the security of cookies. They aren't. They are user data and 
therefore cannot be fully trusted. Just like data received from a text field, 
for example.

Generally speaking, you should store your data in a database, and use a cookie 
to store some kind of identifier so you can find the right data later.

I agree, but sometimes your client wants to be difficult. The users are told no 
data are captured and saved on a database but the user of the form must still 
be able to store values on the form for later. In this case I have 70 values 
that needs to be stored but none of it is really worth anything security wise. 
It is just a way to disconnect the user of the form, from the company database. 
The users don't want the company to gather the data from the forms but are 
willing to store the data on a cookie. Basically it is just a sort of 
calculator.

I have also thought about email a long GET URL with all the values attached. So 
the user then just clicks on his/her emailed link and the form would 
re-populate itself.

So far I think I'm going to try serializing the form variables using XML.      
_________________
Rudolph Thomas
TIGME.COM  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to