Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recover from an error loading page with jQuery mobile when safari components are hidden?

When your mobile web app is added to an iOS home screen and you choose to hide safari components with this meta tag:

 <meta name="apple-mobile-web-app-capable" content="yes" />

If one of your pages has an error loading, jQuery mobile shows an error message overlay and all the links on the current page are dead. With the safari components hidden, there's no way to easily reload the page. You need to go back to your homescreen and open the mobile web app again. Is there a more elegant way to recover from an error in this scenario? Is there a way to force a page reload after you hit a page load error in mobile jQuery?

like image 760
Eric Stephens Avatar asked Oct 12 '22 12:10

Eric Stephens


1 Answers

That's a funny situation...

If I were you I'd try to implement a .live() event binding that would go back to functional state when user clicks the error popup.

Use firebug to find out what distinguishing classes the popup div has.

like image 105
naugtur Avatar answered Nov 15 '22 08:11

naugtur