(Before downvoting/flagging please note that there are already similar questions but none of them do work with plain javascript)
Whenever a Link on the Facebook-Feed is clicked on an iOS device (only via facebook app) it will open in a WebView and not in a new browser window (like it is on android).
When this happens, the web application that is about to be opened breaks, so I need to trick iOS somehow and force it to open the link in the users standard browser (where the web application works flawlessly).
If that's only possible when a button is klicked it would also be no problem. But from what I have tried everything opened in the WebView and I just could not get it managed to open it in the browser.
I've seen a couple of ObjectiveC solutions which I cannot of course make use of in a web application. So I'd like to stick to JS/HTML (or PHP but I don't think it will be much of a help)
What does not work:
<a href="http://google.com" target="_blank">My Link Text</a>
A normal link with the target attribute will not do the trick. The link will instead open within the WebView.
window.open('http://google.com');
window.open
won't work neither (of course I've attached it to an event handler). It seems that the webview will not respond to window.open()
anyways.
So anyone here who has a solution? I hope that's not some weird iOS guidline.