fix(cookies): Use max-age instead of expires

pull/3743/head
Simpler1 2023-07-21 13:27:44 -04:00
parent ef68943b7c
commit 10f7e4320f
3 changed files with 3 additions and 3 deletions

View File

@ -658,7 +658,7 @@ function setCookie(name, value, seconds) {
expires = "; expires=" + date.toUTCString();
} else {
// 2147483647 is 2^31 - 1 which is January of 2038 to avoid the 32bit integer overflow bug.
expires = "; expires=2147483647";
expires = "; max-age=2147483647";
}
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=strict";
}

View File

@ -104,7 +104,7 @@ getBodyTopHTML();
data-search="true"
data-cookie="true"
data-cookie-id-table="AddMonitorsTable"
data-cookie-expire="86400s"
data-cookie-expire="2y"
data-click-to-select="true"
data-remember-order="false"
data-show-columns="true"

View File

@ -28,7 +28,7 @@ function changeScale() {
img.css('width', newWidth + 'px');
img.css('height', newHeight + 'px');
}
setCookie('zmWatchScale', scale, 3600);
setCookie('zmWatchScale', scale);
$j.each(controlsLinks, function(k, anchor) { // Make frames respect scale choices
if (anchor) {
anchor.prop('href', anchor.prop('href').replace(/scale=.*&/, 'scale=' + scale + '&'));