Open-Source PHP Framework - Designed for rapid development of performance-oriented scalable applications

Cookie JavaScript class

API >> webroot >> js >> cookie.js

cookie.write(name, value, expires, args)

Sets a cookie. Arguments are:

  • name
  • value
  • expires - Optional Can be an int (number of days) or smart string eg.: 3 hours, 6 weeks, 1 year, etc.
  • args - Optional, a JavaScript object with keys for any or all of: domain, host or (Boolean) secure

Returns the cookie string; if the cookie is not set it returns null


Removes a cookie