The random _id in the name creates 100+ different cookies over time and sooner or later leads to HTTP error code 431 Request Header Fields Too Large and site stops responding...
I changed this:
if (!window.name) {
window.name = Math.random();
}
to this:
if (!window.name) {
window.name = 'fixedName';
}
which fixes it.
Is there a specific reason you are using the random name?
Regards,
Alex