tags:

views:

23

answers:

1

hi, i have create a cookie using setcookie method in php. i want to reset this cookie using ajax. but this doesn't work. if any one have an idea. please help.

Thanks,

A: 

You should reset it on the client side, no need for ajax call. For example, you can write it in javascript this way:

function del_cookie(name) {
document.cookie = name +
'=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}
vucetica
This won't work for HttpOnly cookies, though.
Avel