Cookie Store Alternative for Firefox and Safari Browsers

Viewed 173

At present I am looking to capture expiry date for cookies on the browser.

These are cookies set by others and I can't change it. Just looking to read the cookie and it's expiry.

The following works for Chrome and Edge.

cookieStore.get('myCookie')
    .then(cookie => cookie.expiry)
    .then(expiry => console.log(expiry))

But this is not supported in Firefox and Safari as mentioned here under browser compatibility.

https://developer.mozilla.org/en-US/docs/Web/API/CookieStore

Are there alternatives, work arounds for Firefox and Safari to achieve the same?

Please advice. Thanks.

0 Answers
Related