Cookies are not set in Safari until page refresh

318 Views Asked by At

If I go to the JS console in Safari and write

document.cookie = 'cookie1=test; expires=Sun, 1 Jan 2023 00:00:00 UTC; path=/'

the cookie won't be visible under the Storage tab until I refresh the page. This behaviour seems to be Safari specific and my page has issues because of it.

Has anybody encountered similar issue? I'm using js-cookie library to set cookies v.3.0.1.

0

There are 0 best solutions below