Merge pull request #3743 from Simpler1/master
fix(cookies): Use max-age instead of expirespull/3745/head
commit
5fd544b1b0
|
@ -658,7 +658,7 @@ function setCookie(name, value, seconds) {
|
||||||
expires = "; expires=" + date.toUTCString();
|
expires = "; expires=" + date.toUTCString();
|
||||||
} else {
|
} else {
|
||||||
// 2147483647 is 2^31 - 1 which is January of 2038 to avoid the 32bit integer overflow bug.
|
// 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";
|
document.cookie = name + "=" + (value || "") + expires + "; path=/; samesite=strict";
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ getBodyTopHTML();
|
||||||
data-search="true"
|
data-search="true"
|
||||||
data-cookie="true"
|
data-cookie="true"
|
||||||
data-cookie-id-table="AddMonitorsTable"
|
data-cookie-id-table="AddMonitorsTable"
|
||||||
data-cookie-expire="86400s"
|
data-cookie-expire="2y"
|
||||||
data-click-to-select="true"
|
data-click-to-select="true"
|
||||||
data-remember-order="false"
|
data-remember-order="false"
|
||||||
data-show-columns="true"
|
data-show-columns="true"
|
||||||
|
|
|
@ -28,7 +28,7 @@ function changeScale() {
|
||||||
img.css('width', newWidth + 'px');
|
img.css('width', newWidth + 'px');
|
||||||
img.css('height', newHeight + 'px');
|
img.css('height', newHeight + 'px');
|
||||||
}
|
}
|
||||||
setCookie('zmWatchScale', scale, 3600);
|
setCookie('zmWatchScale', scale);
|
||||||
$j.each(controlsLinks, function(k, anchor) { // Make frames respect scale choices
|
$j.each(controlsLinks, function(k, anchor) { // Make frames respect scale choices
|
||||||
if (anchor) {
|
if (anchor) {
|
||||||
anchor.prop('href', anchor.prop('href').replace(/scale=.*&/, 'scale=' + scale + '&'));
|
anchor.prop('href', anchor.prop('href').replace(/scale=.*&/, 'scale=' + scale + '&'));
|
||||||
|
|
Loading…
Reference in New Issue