UI Enhancer cookie can have added features such as path and expiry date
Description
Currently the UI Enhancer is saving a cookie with a name and value and leaving the other cookie fields as default. We may wish to provide the ability to save the cookie with non-default options.
The following is a typical cookie string assigned to document.cookie: document.cookie = 'ppkcookie1=testcookie; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/'
The format is generally: 1. First the name-value pair ('ppkcookie1=testcookie') 2. then a semicolon and a space 3. then the expiry date in the correct format ('expires=Thu, 2 Aug 2001 20:47:11 UTC') - if this is omitted then the cookie expires at session end (closing the browser) 4. again a semicolon and a space 5. then the path (path=/) - if path is omitted, the path is the current web path (possibly a single page)
Currently the UI Enhancer is saving a cookie with a name and value and leaving the other cookie fields as default. We may wish to provide the ability to save the cookie with non-default options.
Some useful references for cookies in javascript:
http://www.quirksmode.org/js/cookies.html
http://www.w3schools.com/JS/js_cookies.asp
http://www.elated.com/articles/javascript-and-cookies/
The following is a typical cookie string assigned to document.cookie:
document.cookie = 'ppkcookie1=testcookie; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/'
The format is generally:
1. First the name-value pair ('ppkcookie1=testcookie')
2. then a semicolon and a space
3. then the expiry date in the correct format ('expires=Thu, 2 Aug 2001 20:47:11 UTC') - if this is omitted then the cookie expires at session end (closing the browser)
4. again a semicolon and a space
5. then the path (path=/) - if path is omitted, the path is the current web path (possibly a single page)
JQuery has a cookie plugin http://plugins.jquery.com/project/Cookie - I'm not sure if this is the way to go