How can I create and read a value from a cookie in JavaScript?
A simple read
var getCookie = function (name) { var valueStart = document.cookie.indexOf(name + "=") + name.length + 1; var valueEnd = document.cookie.indexOf(";", valueStart); return document.cookie.slice(valueStart, valueEnd) }