-
29 Aug 2011 6:05 AM #1
AJAX global default timeout
AJAX global default timeout
Hello All
I can't seem to overwrite the global ajax timeout of 30 seconds.
If I try to update the timeout globally to 45 seconds, it still times out after 30 seconds.
Ext.Ajax.timeout = 45000;
If I set timeout on ajax proxy on data store to 45 seconds it works. What am I don't wrong? I want to change timeout globally instead of setting it on every datastore.
Ext.create('Ext.data.Store', {
....
proxy: {
type: 'ajax',
timeout: 45000,
...
}
I should also add that I am using extjs 4.
Thank you for your help.
-
1 Sep 2011 3:08 AM #2
I had done that like this in Ext 3, Ext override doesn't seem to be changed in Ext 4 so this should work.
Connection class is base of all ajax requests so it will extend time for any kind of ajax request.
Code:Ext.override(Ext.data.Connection, { timeout:45000 }
-
1 Sep 2011 1:29 PM #3
When using an Ajax Proxy, rather than just an Ajax Request, you will need to do:
Code:Ext.override(Ext.data.proxy.Ajax, { timeout:60000 });
-
2 Sep 2011 6:57 AM #4
Thank you very much. This did the trick.


Reply With Quote