I.T. Discussion Community!
-Collapse +Expand
Design
Search Design Group:

Advanced
-Collapse +Expand Design Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► KBWebsite Design   Print This    All Groups  
  From the August 2009 Issue of Prestwood eMag
 
Website Design:
IE8 Combatibility Isn't Compatible
 
Posted 10 years ago on 7/16/2009
Take Away:

With the release of Internet Explorer 8, Microsoft has made IE more compliant with current standards, fixing problems that have bugged webmasters for years. This compatibility would probably be great except that it breaks perfectly good web applications created using Microsoft's latest and greatest development tools. This is the sort of thing that results in Apple's great TV ads. In this article, we introduce Compatibility View, discuss the problem, and a couple of the solutions.

KB102016

First, a Compatibility View Rundown

With IE8, you now have a new icon next to your address bar:

Ineternet Explorer Compatibily View icon next to address bar.

If you encounter a web site that doesn't seem to be displaying properly, you can click the new compatibility view button.  This tells Internet Explorer 8 to render the site in "compatibility view," which means that IE8 will behave more like IE7.

The new Compatibility View icon is highlighted when IE is in compatibily view:

How do you tell you are in Compatibility View?

Click the icon to force a website into Compatibility View if IE hasn't auto-detected it's need (which is a bit too common).

In fact, the problem is so pevasive that Microsoft is tracking it, and you can "subscribe" to a list of web sites that should be rendered in compatibility view. This list is automatically updated based upon end users turning on compatibility view for various web sites.

You can find out how to subscribe to that list here:

http://support.microsoft.com/kb/960321

Now, a Developer's Nightmare

It just happened to me, and I didn't much appreciate it:

I was finishing up the work on a complete web site makeover for a client when, while unit testing, my pages' main menu quit working.  Oh, you could see that it was trying to work; it's a horizontal menu with pulldown choices that partially obscure page content.  Well, the page content was being obscured, all right, but with plain white.

Thinking a co-worker may have altered this project's master page, I checked that.  Nope, all was as it should be.

It worked last week, and it still worked in Firefox.  So what had changed?

I realzed just one thing had changed; I'd allowed Microsoft Updates to install IE v8.

IE8 has a "Page" button that, when clicked, shows a bunch of options.  Among them is "Compatibility View." When I selected that, my site rendered properly.  (It also has the compabibility view button, mentioned above.)

But that is not an acceptable solution.  Imagine our client's ire if we'd deployed the site as-is, and suddenly they became inundated with support calls and had to explain to visitors how to put their browser into compatibility view. They'd be livid, and we'd look like fools.

I found ways to resolve this problem, which we'll get to in a moment.

But, just for fun (especially if you have IE8 installed), go to this Microsoft blog:
http://blogs.msdn.com/ie/archive/2009/02/16/just-the-facts-recap-of-compatibility-view.aspx

First, if you view it with IE8, click IE's "Page" button and notice that "Compatibility View" is grayed-out. What that tells you is that Microsoft already knows that their own pages are non-standards-compliant, and have taken measures to force IE8 into compatibility view!

It's highly probable these pages were authored with Microsoft tools.  Ya think?  If you view the page source, .NET artifacts are all over the place.

The crazy thing is the blog actually blames web developers, claiming that Microsoft's been "evangelizing" developers to get them to produce compatible sites. 

What? I never got the announcement that using ASP .NET controls (like menus or trees) would break my sites!

Okay, enough of the laughable.  Let's get to solutions:

Here, you'll find descriptions of ways to ensure your web pages display properly in IE8.  Well, sort of:
http://msdn.microsoft.com/en-us/library/dd433048(VS.85).aspx

Of the solutions proposed, only one is universally applicable, so we'll describe it here.  If you have control over your production IIS servers, you might want to explore the other approaches.

Here is a better link to this method:
http://msdn.microsoft.com/en-us/library/cc817574.aspx

There is a meta-tag compatibility directive you can put in the head section of your pages, and it's very simple:

<html>
   <head>
   <!-- Mimic Internet Explorer 7 -->
      <title>My Web Page</title>
      <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
   </head>
   <body>
      <p>Content goes here.</p>
   </body>
</html>

Note that you can put this meta-tag into your site's master page(s) and be done with it.  It'll automatically appear in all your derived pages.

The proper, long term solution would be for Microsoft to update their .NET components to render "compatible" HTML so we don't have to stick that silly meta-tag in our code, or pursue the other approaches.

Meanwhile, expect Apple to have some more fun at Microsoft's expense.

More Info

FAQ:  Where is v3.5 of the .NET Framework in IIS configuration?

Comments

0 Comments.
Share a thought or comment...
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1125A1
Enter key:
Article Contributed By Wes Peterson:

Wes Peterson is a Senior Programmer Analyst with Prestwood IT Solutions where he develops custom Windows software and custom websites using .Net and Delphi. When Wes is not coding for clients, he participates in this online community. Prior to his 10-year love-affair with Delphi, he worked with several other tools and databases. Currently he specializes in VS.Net using C# and VB.Net. To Wes, the .NET revolution is as exciting as the birth of Delphi.

Visit Profile

 KB Article #102016 Counter
8394
Since 7/16/2009

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech