docs.roxen.comBack to normal mode
DocsRoxenWebServer 6.1Web Developer ManualProtocol Tags
Copyright © 2021, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com

<set-cookie/>

Provided by module: Tags: RXML tags

Sets a cookie that will be stored by the user's browser. This is a simple and effective way of storing data that is local to the user. If no arguments specifying the time the cookie should survive is given to the tag, it will live until the end of the current browser session. Otherwise, the cookie will be persistent, and the next time the user visits the site, she will bring the cookie with her.

Note that the change of a cookie will not take effect until the next page load.


Attributes

name="string"

The name of the cookie.


seconds="number"

Add this number of seconds to the time the cookie is kept.


minutes="number"

Add this number of minutes to the time the cookie is kept.


hours="number"

Add this number of hours to the time the cookie is kept.


days="number"

Add this number of days to the time the cookie is kept.


weeks="number"

Add this number of weeks to the time the cookie is kept.


months="number"

Add this number of months to the time the cookie is kept.


years="number"

Add this number of years to the time the cookie is kept.


persistent

Keep the cookie for five years.


domain

The domain for which the cookie is valid.


value="string"

The value the cookie will be set to.


path="string" ()

The path in which the cookie should be available.


secure

If this attribute is present the cookie will be set with the Secure attribute. The Secure flag instructs the user agent to use only (unspecified) secure means to contact the origin server whenever it sends back the cookie. If the browser supports the secure flag, it will not send the cookie when the request is going to an HTTP page.


httponly

If this attribute is present the cookie will be set with the HttpOnly attribute. If the browser supports the HttpOnly flag, the cookie will be secured from being accessed by a client side script.