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.