Skip over navigation

Roxen Interactive RXML Help

<set-cookie/>

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
name=string
This attribute is required.

The name of the cookie.

seconds
seconds=number

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

minutes
minutes=number

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

hours
hours=number

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

days
days=number

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

weeks
weeks=number

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

months
months=number

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

years
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
value=string

The value the cookie will be set to.

path
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.