Set a new cookie.
Name of the cookie
Cookie value
Number of DAYS before the cookie expires.
Cookie path
Cookie domain
If it should only be sent through secure connection
2.6.0-fork Use encodeURIComponent instead of deprecated escape
Set a new cookie.