I am using Extjs for a while but it's the first try to make some components stateful. I decided to use the SessionProvider found in the examples.

I've rewritten to use some internal database objects to store the current application state, but the mechanism is the same: writing with cookies, reading by including a json generating javascript file in the header.

If I delete the cookies after read it and store the data, the application state could not be resolved.

I've made some tests with the SessionProvider to not use cookies (the superclass call) and it works. The cookie data and the json are the same if dumped.

Is there something in the base class which prevents the provider to work properly?

Here is the code of the provider:

 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * [email protected]
 * http://www.extjs.com/license
Ext.state.SessionProvider = Ext.extend(Ext.state.CookieProvider, {
    readCookies : function(){
            for(var k in this.state){
                if(typeof this.state[k] == 'string'){
                    this.state[k] = this.decodeValue(this.state[k]);
        return Ext.apply(this.state || {}, Ext.state.SessionProvider.superclass.readCookies.call(this));