I found this piece of code in all.js from Facebook's core JavaScript. Looks like the cookie has an expiration date of 04 Feb 2004, apparently the day Facebook was born. Anyone curious enough to tell me whether this piece of code really has value or just exists for historical significance.
function j(m, n, o) {
m = m + h.getClientID();
var p = i && i !== '.';
if (p) {
document.cookie = m + '=; expires=Wed, 04 Feb 2004 08:00:00 GMT;';
document.cookie = m + '=; expires=Wed, 04 Feb 2004 08:00:00 GMT;' + 'domain=' + location.hostname + ';';
}
var q = new Date(o).toGMTString();
document.cookie = m + '=' + n + (n && o === 0 ? '' : '; expires=' + q) + '; path=/' + (p ? '; domain=' + i : '');
}
From what I understand, setting an expiry date 10 years in the past doesn't really make sense to me. I might be wrong, but I am interested to know nonetheless. I think it's just one of the snippets left over by Zuck?
document.cookie="username=John Doe; expires=Thu, 18 Dec 2013 12:00:00 GMT";
http://connect.facebook.net/en_US/all.js
Used JsBeautifier to make it readable: http://jsbeautifier.org/