views:

67

answers:

1

Hello, How can we delete a cookie [jquery plugin cookie $.cookie()] or set it to null on one page from a diff page? I want to delete a cookie on page 2 from page 1 on button click. I tried so many diff ways and I was unsuccessful. please help. is there any work around?

A: 

A cookie is not tied to a page. It is stored on the client computer/browser and sent along each request to the server. So if you set it to null on one page it will be deleted and no longer sent.

Darin Dimitrov
Thanks for your reply Darin. and thats what i though..but that is not working. I have $.cookie('x',value) on page 2 . from page 1 if i try $.cookie('x',null) it is not changing the cookie value on page 2.
kalyan