Article Preview
Buy Now
COLUMN
Web Applications
Create web applications using Real Studio
Issue: 10.4 (May/June 2012)
Author: Paul Lefebvre
Author Bio: Paul Lefebvre is the Real Software Developer Evangelist. He has developed software professionally for almost 20 years and has used Real Studio for over 10 years.
Article Description: No description available.
Article Length (in bytes): 3,974
Starting Page Number: 77
Article Number: 10411
Related Web Link(s):
http://en.wikipedia.org/wiki/HTTP_cookie
http://docs.realsoftware.com/index.php/WebSession
Excerpt of article text...
All web sites and web applications have a standard way of retaining user data: cookies. Real Studio web applications also have several methods for accessing cookies, all of which are part of the Session class.
So what is a cookie? It is just string data that is retained by the browser so that it can be retrieved later. Cookies are stored for each session so that the values that you save for each user are completely independent.
Cookies have limitations. The biggest is that they might not be enabled. Users can choose to disable cookies in their browser security settings. Most users do not do this since it breaks much of the way the web works, but it is something to keep in mind.
Saving a Value with a Cookie
To save a value with a Cookie, you simply set the Cookie. This code sets a cookie called "UserName" to the value in the userName string:
...End of Excerpt. Please purchase the magazine to read the full article.