mardi 27 mai 2014

Store timeout WHILE loading data

Hello there, I'm having a store which loads JSON objects from a server (see below).

As you can see the timeout for this request is set to 1 minute. Now that my JSON objects get pretty big (15mb) and the server connection is not always the best, I sometimes get timeout error, ALTHOUGH I'm still recieving data from that request.


Now I'm looking for some inside here, where to start off and how to handle this, because actually when data is coming in I dont want this request to fail. But only by increasing the timeout, this is no option for me, because its not very cool to wait like 2-3 minutes and your devices tells you the request timed out! I would only abort the store load, when I'm not recieving data for a specific time.


From XHR request I know for example, that they fire the onprogress event while still loading data...


Do you have an idea for me?


Greetz, vanson


Ext.create('Ext.data.Store', { model: 'ST.model.remote.Project', storeId: 'remoteProjectStore', autoLoad: false, proxy: { type: 'jsonp', timeout: 60000, url: activationUrl, reader: { type: 'json', rootProperty: 'projects' } } });





Aucun commentaire:

Enregistrer un commentaire