PDA

View Full Version : Set Cookie not working in IE



ambarishp
2 Dec 2010, 6:56 AM
I have created cookie state provider object to store the 'id' in cookie
The cookie variable values are available even after refreshing the page in firefox and crome browser. But the cookies are cleared in IE when i refresh the page.
Here is my code:

cookie = new Ext.state.CookieProvider({
path: "/",
expires: new Date(new Date().getTime()+(1000*60*60*4)), // 4 hours
domain: ""
});
Ext.state.Manager.setProvider(cookie);

Ext.state.Manager.set('abc','20');

Please help me fix this problem for IE

Thanks,
Ambarish

Screamy
2 Dec 2010, 10:04 AM
As far as I can tell, your code looks syntactically correct, though I'm not sure how IE handles an empty domain String.

Could it be an IE setting?

Tools -> Internet Options -> Advanced -> Empty temporary internet files when browser is closed.