0
I have a cookie set with javascript, I created it like this:
document.cookie='gravado=sim'
I don’t know how I’m gonna make sure he exists. I need to make a check because if it does not exist, I will redirect to another page, also need to know how to destroy this cookie
Thank you, and to destroy the session I do how? in php is very simple, I can use the command Destroy or unset and ready, already in javascript I do not know how to do
– Otavio Fagundes
Please mark the answer as right I will correct the answer
– Jorge Costa
ready, I scored
– Otavio Fagundes
I searched and all I found was a way to set the time for the cookie to expire, I wanted something I could do right away, for example, when I click something or after performing a certain task I can delete the cookie
– Otavio Fagundes
You can always assign a value that determines your interest e.g. saved=deleted
– Jorge Costa