Why Internet Explorer 10 Metro should have a different User-Agent

So, you may not know this yet, but Windows 8 has these two different “user modes”, one is the normal desktop windows experience that we’re all accustomed to and the other is a more “smartphony” or “tablety” experience called Metro. The usage is a little bit disjoint and confusing for my tastes, but that isn’t really the issue. The issue relates to Internet Explorer 10 (IE10), and how it behaves and operates on Windows 8 in desktop vs metro mode.

The Problem

You see, when running IE from the Metro experience, IE10 behaves in a different way. The UI is different, and one of the more notable differences is that no ActiveX plugins will work, at all, period. If you’re running is desktop mode, then IE doesn’t have this limitation and works pretty much as it does on Windows 7. Fine, a hard line decision that seems to stem from their push to get people to write HTML5 and Metro apps, but I’ve got no real issues with that either. The issue I do have is this: there is no way for a web app developer to tell if IE is running in “metro mode” or not. This is a problem.

You see, I work on a product which requires a native plugin to work. There is no HTML5 way to monitor a screen for changes and then capture those changes, compress them efficiently and then send them to a server to be shared with other people you have elected to share them with. This is the kind of thing that is only possible through a native code that can interface with the HTML on a browser page, and so our product requires a plugin that makes available an ActiveX control that our HTML web app can communicate with. So, for our product to be able to work on Windows 8, you’ll need to be running on IE10 from the desktop, not in “Metro mode” (or Firefox or Chrome, we have plugins for those browsers as well that work just fine). However, since we have no way of detecting that you are in Metro mode, then we can’t put up friendly UI to explain that we won’t work in Metro mode. To our code, everything just looks like you don’t have our plugin installed, and we will desperately try to install it, to no avail. The easiest solution to this, for me, seems to be some sort of addition to the User-Agent string that IE10 in Metro mode publishes to indicate that it is in Metro mode.

X-UA-Compatible: requiresActiveX=true

Microsoft has attempted to add something, but, unfortunately it isn’t acceptable. You can add a HTTP header to a response, or a meta tag in your HTML to indicate that your page requires a plugin. This will cause IE running in Metro mode to display something like this:
IE10 Metro redirection to desktop mode
However, this UI is fairly easy to miss, goes away quickly, and doesn’t allow for any indication as to what parts of the website might not work due to the lack of plugin support. All of which could be handled by the web app were it able to detect that the features were unavailable.

Plugin Free Web

In doing some research on this problem, I came across some sentiment that plugins don’t belong on the web. I find this disconcerting. I understand it to a point, there are certain things that are becoming possible with HTML5 and the hope is to push people in that direction instead of relying on browser plugins (ie. Adobe’s Flash). The problem is where web applications need to do things that are outside of the browser sandbox and will likely NEVER be possible using HTML technology alone (ex: Web-based Application Sharing). For these applications there will always need to be some sort of bridge from the web application to a native component, be it a plugin or a native app that should be launched to take over the rest of the interaction. Even still, if the stance for one particular browser is, “no plugins, tough luck” then there should at least be a way for web developers to be able to detect this browser so that they can present clear information to their users about what is going on and what they can do.

I am rushing this post out a bit, and I’m sure I’m missing some key points, but I hope some people from MS will chime in with comments on this, or even better, make some changes to IE10 to fix this problem. I also hope some other web developers will chime in with comments of how this problem is effecting your applications as well.

Author: Bert

This is my website.

3 thoughts on “Why Internet Explorer 10 Metro should have a different User-Agent”

  1. Came here from stackoverflow and just wanted to say that the ‘hope’ is in long term to really sandbox web applications to the point where it’s absolutely impossible for them to do native stuff no matter what, because if you are able to get the user to install something then a malicious site can do that as well making the sandboxing sort of useless. Oh well, as far as a screen sharing application goes: I would say that in long term most applications should build sharing features into them if relevant, because “application sharing” through screensharing is an imperfect solution at best (IMHO a fairly bad solution to be honest). Still screen sharing apps *should* be possible to code in HTML5 I would say, so I suggest you put down a request at the mozilla WebAPI team (https://wiki.mozilla.org/WebAPI). True, it might take 5 or more years before it would get implemented in IE, but at least it would keep your product alive.

  2. @David I respectfully disagree with your assessment of the “hope”. I agree there will be some browser environments where my application won’t make sense, or have a hope of working, and that is perfectly fine, so long as I can detect that environment to provide my users with informative instruction.

    To think that HTML5 will somehow become a panacea of all application development is to ignore history on previous attempts of “panacea” type application development.

    HTML5 is exciting and powerful and fantastic, but native development is still important and useful and there will continue to be platforms where both will have a place and where both will work hand and hand together.

  3. Hi Bert,
    thanks for the great blog. I am facing the same problem as IE 10 Metro is running EPM as default. I am developing a web application which needs to monitor local computer’s sys info like cpu memory (with user’s permission), so this obviously needs a connection between native app and web app.
    I am not using activex or npapi, instead simply make the native app as a local webserver and make the communicate between web and native based on jsonp or cors (this also runs into problem in ie metro since it does not support jsonp and local access). I think you are quite experienced in this area, could you share your comments about how to make web app communicate with native app, using plug-in or local webserver, which one is better? thanks.


Leave a Reply

Your email address will not be published. Required fields are marked *