1. #1
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    36
    Vote Rating
    1
    Chao is on a distinguished road

      0  

    Question Aborting an Ajax request

    Aborting an Ajax request


    I originally mistakenly posted this under 3.0 help but I am actually using 2.0

    I am wondering how does aborting an ajax request work internally, does it send another request to the server?

    I am asking because I have a front end that is continuously refreshing a store by sending ajax request to my backend jsp with a certain set of parameters, without those parameters my back end jsp will crash, sometimes two consecutive store refreshes are too close to each other and it causes EXTJS to call abort on the first call, and for some reason, right after the abort call, my back end jsp receives a request that is WITHOUT any parameters...i am 99.999% sure that I don't have any code that's sending any requests without parameters, so my suspicion is with the abort call

    any help is appreciated

    thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No, aborting a request only aborts the client-side request.

    The server is not notified and will still try to send a reply (that will be ignored by the browser because the request has been aborted).

  3. #3
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    36
    Vote Rating
    1
    Chao is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    No, aborting a request only aborts the client-side request.

    The server is not notified and will still try to send a reply (that will be ignored by the browser because the request has been aborted).
    Thanks for the reply, at the 3.0 help section, there was a reply talking about a known bug when when two requests overlap each other, would that cause one of the requests to drop its parameters somehow?

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Requests without a parameter are usually caused by putting an autoLoad:true in a store and also using load().

  5. #5
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    36
    Vote Rating
    1
    Chao is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Requests without a parameter are usually caused by putting an autoLoad:true in a store and also using load().
    I am using a JsonStore and I am not specifying autoLoad:true, is it true by default? Thanks for the help

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    No it isn't... And no, aborting a request doesn't send another request...

    So, nothing left but debugging. Put a breakpoint on Ext.data.Connection.request and look at the callstack to see what is causing it.

  7. #7
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    36
    Vote Rating
    1
    Chao is on a distinguished road

      0  

    Default


    Condor,

    I did try to debug it, and it seems if I set a breakpoint on that line, every request is fine. I even tried putting an alert box in the Ext.data.Connection.request function like this, and the all the requests are fine, they all have the proper parameters, looks like a timing issue?
    Code:
    alert ('a little delay');
    this.transId = Ext.lib.Ajax.request(method, url, cb, p, o);

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    86
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Do NOT use alert() to debug (the extra wait this introduces changes the behaviour).

    Use console.log() instead.

  9. #9
    Sencha User
    Join Date
    Apr 2010
    Location
    Toronto
    Posts
    36
    Vote Rating
    1
    Chao is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    Do NOT use alert() to debug (the extra wait this introduces changes the behaviour).

    Use console.log() instead.
    thanks! that's very helpful, let me debug it more

Similar Threads

  1. What does aborting an ajax request do exactly?
    By Chao in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 24 Oct 2010, 9:06 PM
  2. add a param to all Ext.Ajax.request (tree, store, normal Ajax.request)
    By aj3423 in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 26 Jan 2010, 9:18 AM
  3. autoLoad vs Ext.Ajax.request... loadScripts not working w/Ajax.request
    By zhegwood in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 6 Aug 2009, 3:28 PM
  4. Ajax.request removes port from request URL
    By emkman in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 4 Aug 2008, 7:26 AM
  5. Aborting fileupload request
    By wavel in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 28 Apr 2008, 6:31 AM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi