Monday, 27 January 2014

IE 11

In HTML 5 era, our product also starts supports HTML 5. While start supporting HTML 5, few items, that doesn't work with IE 11. 
  1. IE Detection. 
  2. Plug-in Detection.
IE Detection

In our code, we detect IE, by obtaining "MSIE" string from user-agent. In IE 11, this will not work.  IE 11 has been removed the MSIE string, instead of it added the "rv" and "like Gecko" strings. Using with that we changed our code to detect IE 11.

Sample UA : "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko"

Plug-in Detection

We were using window.ActiveXObject property to detect the IE plug-in for our Mail Merge feature. But it no longer supports in IE 11. This causes the problem in Mail Merge. Problem is window.ActiveXObject  property is no longer supports in IE 11 but it still supports the ActiveXObject.

Code Before

if (window.ActiveXObject){
     plugin = new ActiveXObject("pluginname")

Code After

var plugin = navigator.plugins["pluginname"];
     plugin = new plugin("pluginname");

Evernote helps you remember everything and get organized effortlessly. Download Evernote.

No comments:

Post a Comment