You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having issues with the cookie path and noticed that when clicking on Accept the cookie would be saved in the current path. So for example if I was browsing domain.com/blog/ the cookie would be saved for that path instead of /. Meaning everytime I visited another URL I got the popup again even though I already clicked on Accept.
I fixed it by adding path=/ to line 10 in app.js:
document.cookie = `${item}=${value};path=/`
It is working fine, but I'm not sure if that's the best solution. Just wanted to share it in case somebody else was experiencing the same issue.
Thank you for the tutorial and the code!
The text was updated successfully, but these errors were encountered:
I was having issues with the cookie path and noticed that when clicking on Accept the cookie would be saved in the current path. So for example if I was browsing
domain.com/blog/
the cookie would be saved for that path instead of/
. Meaning everytime I visited another URL I got the popup again even though I already clicked on Accept.I fixed it by adding
path=/
to line 10 inapp.js
:It is working fine, but I'm not sure if that's the best solution. Just wanted to share it in case somebody else was experiencing the same issue.
Thank you for the tutorial and the code!
The text was updated successfully, but these errors were encountered: