PDA

View Full Version : Remove all cookies



Developer1729
23 Nov 2009, 3:00 AM
cp = new Ext.state.CookieProvider({expires: new Date(new Date().getTime()+(1000*60*30))});
Ext.state.Manager.setProvider(cp);
Ext.state.Manager.set(n.id+"myTreeState", n.getPath());

How can i remove all cookies together?????

something like

cp.clearAll();

without looping through all tree nodes (as you mentioned cookie name by me has node id).

Developer1729
23 Nov 2009, 11:15 PM
It's very simple question, isn't it?

Developer1729
24 Nov 2009, 5:33 AM
I tried classic way, but it doesn't work too.


function removeCookie()
{
var dtExpires = new Date();
dtExpires.setTime(dtExpires.getTime() - 1);
document.cookie += "; expires=" + dtExpires.toGMTString();
}


IT CAN'T BE THAT EXTJS DOESN'T HAVE ANYTHING FOR SUCH A SIMPLE TASK.
Does anyone know how to remove all added cookies?