I usually find an answer to all my questions, but not this time.
I'm trying to store a cookie using javascript on the client browser. Until 2 days ago everything was working perfectly but now my function in some page of my website sets the wrong path.
The function is the simple:
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"
I thought that this is a generic function that make the cookie work in every pages of my website.
If i don't set the specific domain name or the path name the cookie have to be set for all of my website pages.
The problem is that in some pages for some reason that i can't understand the cookie automatically set a wrong path (the actual one),
like
/actualpage
This is a problem because as i get from stack overflow --> https://stackoverflow.com/a/18463119/10557173 if i set a cookie for a specific path, when the url path change the cookie is override and all the function that i made work only if the cookie is not setted start again to work. This is something that i want to avoid.
Does someone know how I can force the cookie to always set no path? /