OpenWGA 7.10 - TMLScript reference

Cookie
Method :

setMaxAge(seconds)

On object Cookie
Usage Sets the max age property of the cookie in seconds.
Parameters

seconds (Number)

The max age value to be set in seconds

Return value Since 7.8.1 this methods returns the Cookie object for further method chaining.
Allowed in script types
  • WebTML pages and normal WebTML actions
  • Master actions
  • Content type events
Examples
WGA.Call.createCookie("my-cookie")
.setMaxAge(60*60*24) // one day
.write()