Redirecting you to Reddit in 5 seconds:
https://old.reddit.com/r/netsec/comments/1gyef3j/handling_cookies_is_a_minefield