I know IE 11 has different user agent string than all other IE
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko
I have tried to detect IE 11 with answer specified for this question'
Thats !!navigator.userAgent.match(/Trident\/7\./)
But I am getting error
Object not found and needs to be re-evaluated.
Then I openede developer console in IE11 and tried to access some predefined javascript objects, I am still getting same error.
I have tried
navigator.userAgent
window.navigator
console.log('test');
Anyone have any idea about it ?
Best Answer
Edit 18 Nov 2016
This code also work (for those who prefer another solution , without using ActiveX)
Original Answer
In order to check Ie11 , you can use this : ( tested)
(or run this)
!(window.ActiveXObject) && "ActiveXObject" in window
I have all VMS of IE :
Notice : this wont work for IE11 :
as you can see here , it returns true :
So what can we do :
Apparently , they added the machine bit space :
ie11 :
ie12 :
so we can do:
this will return true only for ie11.