Ciao a tutti...
Non so se vi è mai successo, ma non riesco a recuperare dei dati di un cookie solo dal browser chrome.
praticamente creo il cookie:
Codice PHP:
function memorizza(variabile,valore)
{
var expDays = 1000;
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
expdate=exp.toGMTString();
document.cookie = ""+variabile+" ="+ valore+"; expires ="+ expdate+";";
}
e lo leggo cosi:
Codice PHP:
function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) { // if there are any cookies
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset)
// set index of end of cookie value
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}
Sapete dirmi come mai non riesco a leggerli su questo browser?
Posso usare qualcos'altro?
Grazie in anticipo
Alberto