views:

51

answers:

2

I'm working on a site that will go on my company's intranet. I developed it locally on my computer, checking it in different browsers and on colleague's computers, and when it was done I handed it off to IT. They put identical copies on a staging server, and on the production server. This is a site built only with html, javascript, and css. No server side scripting. It also uses a DWF viewer plugin from Autodesk. It is a single standalone page (not part of a CMS) that allows users to load drawings into the viewer and then click to see info from a database of space info saved in a series of js arrays (the space DB software spits out a js file with all the info listed in array literals, creating a crap ton of global variables - ugh, but I digress).

When I followed their links (using IE 8) the version on the staging server looked as expected, but the layout is hosed on the version from the production server. Specifically, it seems like a div that is supposed to flow to the right of a div that is float: left is displaying below the floated div at full width, as though it was clear: left (which it is not). It also has the wrong height.

I downloaded the files from each and they are identical to my local version. Frustrated, I cleared my browser's cache, restarted my computer, checked it on a colleague's computer who also has IE 8. All the same issue. Staging server good. Production server bad.

Finally I uninstalled IE 8 and looked at it in IE 6. Both versions looked fine.

So, to recap. Two different servers. No server side scripting. Identical files. One browser agrees they are identical, the other does not. What could cause this?

+4  A: 

Have you checked that IE8 isn't rendering it in compatibility view (IE7 rendering)? By default IE8 renders things in the "Intranet Zone" in compatibility view with everything else in normal mode.

You can change the mode with the little broken page button to the right of the URL bar.

starskythehutch
And the layout could be broken in IE7 but not IE6?Still, sounds plausible. I'll check when I get IE8 reinstalled :)I don't suppose its possible for a site to tell IE which mode to use...
jasongetsdown
Yeah, I know it sucks. It's caught me out a couple of times. There are meta tags so you can specify - detailed here http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx
starskythehutch
Or, is it a difference between zones (taking compatibility out of the equation) - i.e. one is in the intranet zone and the other in the Internet zone? Internet zone is more restrictive regarding scripting, controls, etc.
GalacticCowboy
@starskythehutch you were correct. IE8 was in compatibility mode the whole time I developed the site because it was on a local drive. This masked errors in my css until it went up on the production server. The staging server was just `//ServerName/...` not `http://` making it "intranet" I guess (I'm not a server guy). This has to be the worst default ever. The button for compatibility doesn't even display for a local file! How was I supposed to know! I'm steaming...
jasongetsdown
Glad to be of help. I understand why they did it, but I don't agree with it. If we want it to display in IE7 mode, we should have to modify our intranet sites using the meta tags rather than it being the default!
starskythehutch
As a sidenote, I didn't see the errors in Firefox because the offending div holds the DWF viewer plugin, which is IE only.
jasongetsdown
A: 

Apart from the compatibility setting, other things that could differ from computer to computer for an identical page:

  • Font size. Windows allows system-wide font resizing, impacting layouts. It could account for the second div falling underneath the first one.

  • Resolution. Could it be a resolution issue? Could also account for the div problem.

Pekka
It sounds like he's talking about one client machine hitting different servers, not different clients.
GalacticCowboy
@Galactic aaah, I misread that.
Pekka