Content deleted Content added
Mike Dillon (talk | contribs) No edit summary |
Mike Dillon (talk | contribs) allow unlimited item count; enforce 4000 byte maximum on cookie value |
||
Line 43:
}
}
while (historyItems.
historyItems.pop();
}
}
}
Line 90 ⟶ 92:
historyCookie = "";
for (var n in historyItems) {
var encodedItem = encodeURIComponent(historyItems[n]);
// Limit cookie value size to 4000 bytes
if (historyCookie.length + encodedItem.length + 1 > 4000) break;
if (n > 0) historyCookie += ",";
historyCookie +=
}
writeCookie(pageHistoryCookieName, historyCookie, { path: "/" });
|