Reputation: 32137
well iam trying to get version of IE used by user by using $.browser.version in IE8
iam getting different result when iam writing my url in different formats
http://localhost/test.html----------this is giving result=8
http://192.168.1.2/test.html--------this is giving result= 7
http://www.something.com/test.html--this is giving result= 8
the only problem is when iam using 192.168.1.2, this is my pc's IP , and i want url in this format for testing on network pc's.
i dont know why there is a difference??
Upvotes: 1
Views: 206
Reputation: 944550
Internet Explorer 8 assumes that all Intranet applications are designed for IE7 by default. It therefore emulates IE7 for IP addresses in private ranges unless you tell it otherwise.
Add:
<meta http-equiv="X-UA-Compatible" content="IE=IE8" >
for IE8 mode or
<meta http-equiv="X-UA-Compatible" content="IE=edge">
"Latest version" mode.
You can use a real HTTP header instead, or configure the browser preferences.
For more details, see http://msdn.microsoft.com/en-us/library/cc288325%28VS.85%29.aspx
Upvotes: 2
Reputation: 196306
By default the intranet sites are set to be displayed in compatibility mode.
Go to Tools -> Compatibility View Settings and unset the Display intranet sites in compatibility view
Upvotes: 5