Problems: iFrame are designed to include different documents in a HTML page; that they work to jump-start launch external links is a side-effect. Using them forces a developer to hide junk content in their web page, and the lack of visibility into the external protocol handling makes it difficult to clean up efficiently.
Problems: Interrupts the current page load. Triggers unload events. Also problematic theoretically, as the developer is not sending the user to a new page.
Problems: Interrupts the current page load. Triggers unload events. Reliable as a fallback, but requires user interaction.
Internet Explorer already includes a solution in the form of msLaunchUri. I propose this method be adapted as a cross-browser standard in the form of navigator.launchUri.
navigator.launchUri(uri, successCallback, noHandlerCallback)
Parameters:
- uri
- URL containing protocol of the document or resource to be displayed.
- successCallback
- Function to be executed if the protocol handler is present.
- noHandlerCallback
- Function to be executed if the protocol handler isn't present or the user declined the request to open the handling application.