views:

1940

answers:

4

I've noticed a strange behavior in two different sites when using IE8.

The first site is in the site that I maintain xebra.com.

The second site is google analytics.

The behavior is that when an address is typed directly into the address bar of IE8, both sites display correctly,

But when one of the sites has already been loaded, and you press the refresh button or F5 key, the layout gets all screwed up:

See screenshots here: here

+1  A: 

Something is causing IE8 to render in 'quirks mode' which causes the breakage.

You can duplicate this by browsing to your site in IE8 and selecting Tools > Developer Tools > Document Mode > Quirks Mode.

Make sure your document is always being served in standards mode.

EDIT My original answer had 'compatability mode' where it should have read 'quirks mode' - the two are different.

Steerpike
That's true for the local screenshot, but it isn't true for the screenshot from Google Analytics.
leeand00
Stick this code in your page and tell me what the alert pops up: <a href="javascript:alert(document.compatMode);">What mode am I in?</a>
Steerpike
I tried it in FF3 too, and it said CSS1
leeand00
Yeah, something in the code is causing IE to render in Quirks Mode - normally it's the doctype but yours seems ok from first glance.
Steerpike
Is there any good reason for IE8 running Quirks Mode when you load something directly from the HDD?
leeand00
No - sorry - I made a mistake in my original answer and swapped 'compatability' with 'quirks'. Running something from the HDD will likely trigger compatability mode, whcih in this case is not what I think is causing the issue.
Steerpike
@Steerpike, thanks for the edit! :)
leeand00
@Steerpike, did they fix this bug over the weekend? I'm having trouble replicating it again...
leeand00
+1  A: 

JS.Companion was what was causing this odd bug, and not IE8. Phew!

http://www.my-debugbar.com/wiki/CompanionJS/HomePage

leeand00
A: 

I spent the whole morning trying to figure out what was going on, I removed companion.js and bingo my site is perfect! thanks for this.

A: 

Hi,

That's really strange. I don't have the problem on my computer with Companion.JS installed and http://www.xebra.com/ web page (under Vista SP1).

I would be happyto correct the Companion.JS bug that generates this problem if you can provide more information about the problem.

You can contact me at [email protected] or post on the Companion.JS forum (http://www.my-debugbar.com/forum/f7-Companion.JS-Bugs-Problems.html).

Thanks.