Hi,
This blog guides you about how to store and retrieve cookies from Javascript.
This code should be stored in a file named <filename>.js, e.g. cookie.js :
function Get_Cookie(name) {
var start = document.cookie.indexOf(name+”=”);
var len = start+name.length+1;
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
if (start == -1) return null;
var end = document.cookie.indexOf(“;”,len);
if (end == [...]
Filed under: Scripts, javascript | Tagged: cookies, javascript, session id, store retrieve cookies, user id | Leave a Comment »
