Recently in the use of ExtJS to do projects, in the loading of data is particularly large when loading timeout phenomenon, under the FB view, the original is ext default Ajax request 30 seconds.
Search the following solution online for reference and others.
ExtJS do Ajax request, the default corresponding time is 30 seconds, if the later data query time more than 30 seconds, ExtJS will be an error.
This requires modifying the ExtJS timeout:
2 ways:
1: At the time of Ajax request add: (timeout:100000000) attribute
Copy Code code as follows:
Ext.Ajax.request ({
URL: ' foo.php ',
Success:somefn,
FAILURE:OTHERFN,
Timeout:100000000,//default 30000 milliseconds
Headers: {
' My-header ': ' foo '
},
Params: {foo: ' Bar '}
});
Ext.Ajax.request ({url: ' foo.php ', Success:somefn, FAILURE:OTHERFN, Timeout:100000000,//default, 30000 milliseconds hea DERs: {' my-header ': ' foo '}, params: {foo: ' Bar '}};
2: In the beginning of JS after add: Ext.Ajax.timeout = 180000;
Copy Code code as follows:
Ext.onready (function () {
Ext.blank_image_url = '.. /.. /common/ext3/resources/images/default/s.gif ';
Ext.Ajax.timeout = 180000;
vardatetype;//Report Type
Ext.onready (function () {Ext.blank_image_url = ' ... /.. /common/ext3/resources/images/default/s.gif '; Ext.Ajax.timeout = 180000; var datetype;//report type test found that the first setting is invalid and the second setting is valid.
Too busy relationship, the first test to here, think the most should do or to optimize the database, after all, make a query, let users wait a 3 minutes, it is certainly unacceptable. It's not acceptable for 1 minutes.