Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect IE8 64bit in Javascript

Hey there, I just wondered if there is a method to detect if the 64bit or 32bit Version of IE8 is running?

Because there are some major Bugs in the Facebook Javascript SDK which only occure in IE8x64...

like image 501
Christian Engel Avatar asked Feb 17 '11 15:02

Christian Engel


People also ask

How can you detect the client's browser name in Javascript?

How do I detect the browser name ? You can use the navigator. appName and navigator. userAgent properties.

How do I know if my browser is using IE11?

document. documentMode; // true on IE11 // false on Edge and other IEs/browsers. this will return true only for ie11.

How do I find my userAgent in Internet Explorer?

Detecting the Internet Explorer browser: The user-agent of the Internet Explorer browser is “MSIE” or “rv:”. Both these values are passed to the indexOf() method to detect this value in the user-agent string and the result of both them are used with the OR operator.


2 Answers

According to this IEBlog post you should be able to read it from the browsers User-Agent string via navigator.userAgent:

Detecting 64-bit Internet Explorer

As machines with more than 4 gigabytes of RAM become more common, more and more users are running 64-bit versions of Windows. For compatibility with 3rd party add-ons, the 32-bit edition of Internet Explorer remains the default on 64-bit systems. However, in some cases it can be useful for websites to recognize when users are visiting using 64-bit systems—for instance, a site may want to know whether to offer a 64-bit executable download.

Tokens in the User-Agent string will enable you to determine whether or not the user is running a 64-bit version of Windows, and whether they are running the 64-bit edition of Internet Explorer.

64-bit IE on 64-bit Windows:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Win64; x64; Trident/4.0)

32-bit IE on 64-bit Windows:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0)

Incidentally, WOW64 stands for “Windows on Windows 64-bit.”

like image 129
Martin Buberl Avatar answered Sep 18 '22 15:09

Martin Buberl


The User Agent string for a 64-bit IE browser will indicate that it's 'x64' or 'Win64' if it's a 64-bit browser.

http://blogs.msdn.com/b/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx

A 64-bit IE8 user agent string:

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Win64; x64; Trident/4.0)

vs. a 32-bit

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0)

like image 32
逆さま Avatar answered Sep 17 '22 15:09

逆さま