From Xojo Documentation
Creates a cookie for the current browser using the supplied values. Cookies are a mechanism for storing small amounts of information in a user's browser, usually for the purpose of identification.
- Expiration: (optional) allows you to specify when the cookie expires. If Expiration is not provided, the cookie expires when the user quits their browser. When a cookie reaches its expiration date, it is removed. You can extend the expiration date of a cookie by setting the same cookie value with a date further in the future.
- Domain: (optional) allows you to specify the domain name associated with the cookie. This is useful if your web application can be accessed from several domains, but you only want the cookie to be saved for one of them.
- Path: (optional) allows you to specify the url path associated with the cookie.
- Secure: (optional) tells the browser (when True) to only send the cookie to the server when it's connected through HTTPS. This setting is useful for login pages.
Cookies are browser specific. If a user has multiple instances of your app open at the same time using the same browser, they will all share the same cookie information.
This example sets a cookie called "UserName" to the value in the userName string: