Apple Web-App, stay in web-app mode after clicking

182 Views Asked by At

Apple provides some meta-tags you can have your application opened fullscreen, when you have the website on your homescreen.

<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />

That works fine, but when you go to a next page, it opens Safari. So it's out of the webapp view.

Is there a way to prevent that?

I tried the following code, and that works fine. But that's not preferable.

$(document).on('a', 'click', function(){ return window.location = $(this).attr('href'); });

Apple isn't a big fan of that feature I guess, because I can't find any documentation about it on their docs.

0

There are 0 best solutions below