I have very strange problem specific to IE (confirmed in v8 and v9).
When using jquery to determine div height with:
$('#sys_MainPage').height()
This code returns cca. 260 in Chrome, Firefox and IE (only if I access application using IP address). But, if I access application using server name and IE 8/9, calculated height is 853?
I’m using jquery 1.4.2.
What could be the cause? Is there any proper reason for this weird behaviour?
EDIT:
Problem is caused with different compatibility modes:
Site is accessed using IP address:
Browser mode: IE8
Document mode: IE8 standards
Using server name:
Browser mode: IE8 compat view
Document mode: IE7 standards
I solved this with web.config edit but I still don’t understand why is browser/document mode different depending on entered url?
Your site is switching to compatability mode when it is being viewed from one of these locations.
You can find a way here Force IE8 *not* to use Compatibility View to force it not to switch. However I would still test this in IE7 and make sure that it is not broken for that.
Pretty much what you need to specify is this:
As for why it is broken – we would need to look at the site to do that there are hundreds of reasons why.