facebook

Ajax issue w/ Internet Provider (Comcast)?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #334622 Reply

    Unknown Author
    Participant

    Noticed some odd app behavior and am wondering whether anyone more-expert in web programming can tell me a cause and possible solution.

    My app is designed so that, when a button is pressed, multiple Ajax calls will occur, then those results will be thrown into a custom list. The custom list does not generate until all the Ajax calls recieve a response (recursive waiting). It is an iOS native app. I am testing on an iPhone 4S.

    On AT&T, this works reliably and repeatedly. Ajax responses are captured and the list page is generated. On WiFi (Comcast, through my home router), this works only once. The second Ajax group of requests will cause the app to hang, as it’s not getting all the responses back that it needs.

    Has anyone encountered this before? Is it a Comcast thing for iOS apps? When I do the requests from Test Center on my PC, it has no issues.

    -1TC

    UPDATE: Am now investigating a timing issue, as puting an “alert(results)” into every Ajax “sucess:” has slowed the app down to work properly. I’m thinking there’s a timing issue in calling the page transitions too quickly. Calling the transition to the results page before the call to the “please wait” page is complete.

    UPDATE 2: I think I introduced a race condition by puting gotopage commands (based on completion of Ajax calls) in pretransition code. I have moved the code block to posttransition and am seeing better performance.

    #334747 Reply

    @1thinchip,

    We are not aware of any network specific problems with ajax calls. I typically avoid alerts in such code, instead use console.log() except on ios6 where Apple removed the javascript console (crap!). For ios6 debugging we have been using debug.phonegap.com and chrome.

    #334922 Reply

    Unknown Author
    Participant

    It turned out to be a race condition caused by a gotopage inside the pretransition function. I moved the gotopage to the posttransition function and it’s all working now.

    How long before donij comments that this thread is a waste of “experts” time?

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Ajax issue w/ Internet Provider (Comcast)?

You must be logged in to post in the forum log in