0

I have a site which I've saved to my Home screen on the iPad.

When I open it, the site works fine and the full functionality can be used.

However, when I lock the iPad then unlock it and go back to the site all ajax requests stop working.

The ajax I'm using is pretty standard:

    $.ajax({
        type: method,
        url: action,
        data: $(this).serialize(),
        error: function(error) {
            alert(error);
        },
        success: function(json) {

            //do things

        }
    });

Is there any way around this? Refreshing the page doesn't work, and the problem doesn't occur when I load it directly in Safari, then lock and unlock. It's only when the site has been saved to the home screen.

Karl
  • 5,435
  • 11
  • 44
  • 70
  • I think that iOS drop connection while locked, and your request broken. Try to spy connection errors, and write them to your page. This would be helpful. – Lesha Ogonkov Sep 30 '14 at 17:21
  • This isn't when there's an active request though. It's just when you go back to the page any new Ajax requests you attempt to make, don't work. – Karl Sep 30 '14 at 19:02
  • As far as I know there are no errors, or shouldn't be, since it works completely fine before it's locked. – Karl Sep 30 '14 at 19:37
  • Here should be remote debuggling on iOS, can you look what happens on Network tab in your case? – Lesha Ogonkov Sep 30 '14 at 19:41
  • I'm not sure how to debug on the iPad. – Karl Sep 30 '14 at 19:42
  • I'm afaid i couldn't help you, i didn't have apple devices – Lesha Ogonkov Sep 30 '14 at 19:50
  • 1
    I've found out that it's because of the `` which causes the web app to cache everything. Which in turns stops the javascript, any ideas how I can disable the caching of the web app? – Karl Oct 01 '14 at 10:35
  • possible duplicate of [JSONP calls not working with apple-mobile-web-app-capable="yes"](http://stackoverflow.com/questions/7747264/jsonp-calls-not-working-with-apple-mobile-web-app-capable-yes) – Lesha Ogonkov Oct 01 '14 at 17:54
  • @Karl - Did you find a solution to this? I'm facing the same issue! – nikjohn Nov 12 '14 at 07:34

0 Answers0