How do you read JavaScript cookies? The way to get the value of an existing cookie in JavaScript is really easy. Simply read the cookie property of the global document object. Since all cookie key-value pairs are contained in the same string, you will nee