I am trying to delete a the value cookie that I created after a certain interval. Lets say after 10 second I want the cookie gone
function fullday()
{
document.getElementById("res").innerHTML="1 day";
document.cookie="day="+1;
document.cookie.setMaxAge(0);
}
This is the code above. I'm coding in PHP right now and then when I try to destroy cookie from PHP it works fine, however I need to pass the cookie's value in javascript so now im stuck with it and cannot destroy it.