Setting and getting cookies is a must for user validation in several cases. While pure JavaScript allows for cookie access it is lengthy to write at times. MCookie is makes cookie management in JavaScript very easy.


set(name:String, value:Mixed, expires:Number, path:String, domain:String, secure:Boolean):void

This function creates a cookie on the clients machine. It mimics the syntax of the PHP function setcookie making it easy to transition between PHP and JavaScript.


This function returns a cookie by name. This is similar to how the superglobal $_COOKIE works in PHP.