I am developing a website that will work with mobile safari offline. I can mark it on the main screen and load it from there. But after opening from the main screen, clicking on certain links will jump out of the application and open in mobile safari - despite the fact that I prevented Default () in all clicks on the links!
The application binds the onclick event handler at the level <body>. Using event delegation, he catches any click on any link, looks at its href (for example, "help" or "review") and dynamically calls the javascript template and refreshes the pages. The event handler calls preventDefault () on the event object - for some links this works, and the page refreshes with the output of the template. However, for links that result in a hit on the local database before displaying the results of the template, the links open in mobile safari.
In a desktop safari, all links work even when I'm offline - something happens, this is specific to mobile safaris.
Any thoughts on why some links will work offline, but not others? None of the referenced URLs are listed in the manifest file, but they should not (should not) be, because the link's action has been prevented.
A couple of additional oddities: * As soon as I click on the link downloaded to the mobile safari, even if I'm online, the same links now work, and templates filled with data from db work correctly. in other words: the links do not work when opened from the main screen, but not from the mobile Safari offline * changing the link to delete the remote database (filling out the template using the result of mock db) solves the problem, and you can click the links from the main screen in the application.