put cookie | |||||||||||||||||||
Type | command | ||||||||||||||||||
Dictionary | LCS | ||||||||||||||||||
Library | LiveCode Script | ||||||||||||||||||
Syntax |
| ||||||||||||||||||
Summary | Sets a cookie in a visiting browser for a given URL. | ||||||||||||||||||
Introduced | 4.6.4 | ||||||||||||||||||
OS | mac, windows, linux | ||||||||||||||||||
Platforms | server | ||||||||||||||||||
Parameters |
| ||||||||||||||||||
Example |
| ||||||||||||||||||
Related | Keyword: $_COOKIE | ||||||||||||||||||
Description | Use the put cookie command to create a cookie with the given data in the visiting browser for a specific URL. If the secure form is used, the browser only sends the cookie if communicating over a secure connection (https). If the httponly form is used, the cookie is only available from the browser when communicating with the server and hidden from client-side scripting (for example JavaScript). A cookie is used by a website to store state information in the user's browser, which is returned to the website on subsequent visits. Cookies are often used to store user preferences and session data. For example, you may allow a user to choose a theme through which to view your website and store this choice in a cookie to be used on subsequent visits. When setting a cookie you can specify a path. Cookies are returned to all URLs within the specified path. For example, a cookie set on the domain "www.livecode.com" with the following path:
is available to all pages within and under http://www.livecode.com/products/ To make the cookie available across your entire website, set the path to "/".
|