set cookies globally for the site
All checks were successful
Web/pipeline/head This commit looks good
All checks were successful
Web/pipeline/head This commit looks good
This commit is contained in:
parent
ee5c7b64f0
commit
ff133309db
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ function getCookie(key) {
|
|||
function setCookie(key, value, days) {
|
||||
let date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
document.cookie = `${key}=${value}; expires=${date.toUTCString()}`;
|
||||
document.cookie = `${key}=${value}; expires=${date.toUTCString()}; path=/`;
|
||||
}
|
||||
|
||||
function forceToAnchor() {
|
||||
|
|
Loading…
Reference in a new issue