Why does IE 8 navigator.userAgent return MSIE 7.0?

I am trying to implement a browser support function on my web page. It works fine for Firefox 3.6, but for some reason IE8 userAgent returns the wrong value.

Here is the scenario when I run the "local" javascript code in IE8, navigator.userAgent returns the correct information (MSIE 8.0). But when I run this script on the server, it returns MSIE 7.0 in IE 8 browser.

Any ideas?

+5
source share
3 answers

Microsoft provides this page:

http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx

Javascript , IE8 8, 7.

+2

Trident.

F12 Internet Explorer, , . , Internet Explorer , - , .

, Trident user-agent. , , .

: http://msdn.microsoft.com/en-us/library/ms537503.aspx

+6

Are you sure you are not working in IE7 mode? You can change it somewhere in the developer settings (F12, I think).

+4
source

All Articles