Handling cookies in Magento with JavaScript

In order to handle cookies in Magento refer to /js/mage/cookies.js. The functions for getting, settings and clearing cookies are: Mage.Cookies.set Mage.Cookies.get Mage.Cookies.clear Below you find the corresponding JavaScript functions from cookies.js: Generic cookie clear function In case you are searching for a simple, generic function to clear (Magento) session cookies...