Packagecom.jeffdePascale.fosfr.utils
Classpublic class Cookies

Static methods for accessing and modifying cookie information. It is recommended that calls to this classes methods be wrapped in a test for fosfr.local if used within the Fosfr framework, to prevent code errors when running builds locally.



Public Methods
 MethodDefined by
  
Cookies
  
cookiesEnabled():Boolean
[static] Determines whether cookies are enabled on the client browser.
Cookies
  
deleteCookie(cName:String):void
[static] Deletes the specified cookie by setting its expiration date to be earlier than now.
Cookies
  
getCookie(cName:String):String
[static] Returns the value of the cookie with the specified name.
Cookies
  
setCookie(cName:String, cValue:String, cExpires:Date = null):String
[static] Creates or sets the value of a cookie.
Cookies
Constructor detail
Cookies()constructor
public function Cookies()
Method detail
cookiesEnabled()method
public static function cookiesEnabled():Boolean

Determines whether cookies are enabled on the client browser.

Returns
Boolean — A boolean value specifying whether cookies are enabled on the client browser.
deleteCookie()method 
public static function deleteCookie(cName:String):void

Deletes the specified cookie by setting its expiration date to be earlier than now.

Parameters
cName:String — The name of the cookie to delete.
getCookie()method 
public static function getCookie(cName:String):String

Returns the value of the cookie with the specified name.

Parameters
cName:String — The name of the cookie to get.

Returns
String — The value of the specified cookie.
setCookie()method 
public static function setCookie(cName:String, cValue:String, cExpires:Date = null):String

Creates or sets the value of a cookie.

Parameters
cName:String — The name of the cookie.
 
cValue:String — The value of the cookie.
 
cExpires:Date (default = null) — When the cookie should expire.

Returns
String — The cookie text ("name=value")