Search code examples
ajaxuiwebviewios6backwards-compatibilitychangelist

"AJAX interaction with session cookies" with UIWebView of iOS 5 is not working on iOS 6


Background: I have a program working well in iOS5 which uses UIWebView. The web page is loaded from customized server. Communication between iOS and server is done through AJAX machanism. Cookies are used for session management.

Problem: The events of the client is not reaching the server. Notifications and updates of server is not reaching the client. Because of this, Application is not responding to any user actions and UI looks freezed sometimes.

I searched the apple developer site for changes in UIWebView, It shows only 3 changes.

  • State Preservation" with view’s restorationIdentifier property.
  • New method keyboardDisplayRequiresUserAction.
  • New method suppressesIncrementalRendering

However None of the above seems conflicting with application logic.

Please help with things which might break AJAX interaction in iOS 6 compared with iOS 5. Please give me relavent links if any.


Solution

  • iOS 6 is caching the data and not making fresh request to server when the request matches exactly. Update all the GET requests with rand=<random number> parameter and all POST requests with extra data rand:<random number>. This will make sure that iOS call lands on server every time request is made