There is no way to know when a cookie expires , so i guess there is no function which does what you are asking . The best way is to check the existence , as you said.
Browser cookie expire handling
-
25-06-2023 - |
Pregunta
Is there a function that can be triggered in javascript once a session cookie expires? Or do I have to have a set timeout function in javascript that checks the existence of a cookie.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow