问题
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.
来源:https://stackoverflow.com/questions/26125503/javascript-stops-when-ipad-is-locked