Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Using iframes to open applications

$
0
0

Hi, and thanks for reading.

I am trying to find a solution compatible with all major browsers which will allow a page to open an application if it is installed on the user's machine and to show the user a default page if the application is not installed. I have already experimented with setTimeout but found it to be finicky, requiring user-agent sniffing to ensure that it works across multiple browsers. (This solution is also rather messy as it presents the user with an error page before redirecting to the default page). As an alternative, it was suggested that I instead use a concealed iframe within the default page to attempt to open the app; users will still see the default page in their browser, but if the application is installed, it will open. This is the functionality I get in Safari, Firefox, and Chrome, and it works very well.

In Internet Explorer, however, I am redirected to a "The webpage cannot be displayed" error with a cause of "Some content or files on this webpage require a program that you don't have installed." I realize that I could always write Javascript to continue using setTimeout for IE and only include the iframe for other browsers, but this would still be sniffing the user agent and would present IE users with a poorer experience than non-IE users.

Is there any way to achieve my desired functionality in IE using iframes, or is there any other element that can be used to achieve this which should be compatible with most browsers?

My code looks similar to this:

<iframe name="iframe_name" id="iframe_id" src="someapplication://MightExist"></iframe>


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>