Wednesday, August 27th, 2008

Internet Explorer 8 Beta 2 and Web Standards

Category: Announcements, Browsers, IE

<p>Internet Explorer 8 Beta 2 was released today. There are several cool UI enhancements that this beta brings to the table that I won’t cover in this post, but you can learn more about them on the IEBlog. Instead, I want to talk about how beta 2 affects IE’s relationship to web standards.

First, CSS Expressions are no longer supported in Standards Mode:

Also known as ‘Dynamic Properties’, CSS expressions are a proprietary extension to CSS with a high performance cost. As of Internet Explorer 8 Beta 2, CSS expressions are not supported in IE8 standards mode. They are still supported in IE7 Strict mode and Quirks mode for backward compatibility.

In case you don’t know, CSS expressions were actual bits of JavaScript that you could run from CSS rules; this was commonly used to simulate the CSS max-width property for IE:

  1. div.someClass {
  2. /* Internet Explorer */
  3. width: expression(document.body.clientWidth &gt; 600) ? "600px" : "auto";
  4. /* Standards-compliant browsers */
  5. max-width: 600px;
  6. }

IE 8 beta 2 also now supports alternate style sheets:

Internet Explorer 8 now supports alternative style sheets as specified by HTML4 and CSS2.1. The alternative styles that are defined by the Web page author is available through the Style menu under the Page menu. The styles are also available through the Style menu under the View menu. The No Style option on either menu can be used to disable all authors styling.

In terms of the Known Issues with IE 8 Beta 2, the first is related to Ajax bookmarking and back button support and using window.location.hash to do cross-domain communication:

Internet Explorer 8 create entries in the travel log and back button for each instance of window.location.hash that is set. This is part of the behavior for Internet Explorer 8 AJAX Navigation. If you use this technique to communicate between documents, we recommend that you switch to the Internet Explorer 8 Cross Document Messaging feature that is based on Section 6.4 of the HTML 5.0 specification.

Finally, there are some issues with the onload event for IE’s XDomainRequest object that helps with cross-domain communication:

The onload event may not fire reliably. We recommend you use the onprogress events which continues to fire as the data is received.

Unfortunately this is it for this release. You can see the full Beta 2 release notes, or download it yourself.

On a related note, IE 8 Beta 2 includes cross-site scripting attack (XSS) protection:

The XSS Filter operates as an IE8 component with visibility into all requests / responses flowing through the browser. When the filter discovers likely XSS in a cross-site request, it identifies and neuters the attack if it is replayed in the server’s response. Users are not presented with questions they are unable to answer – IE simply blocks the malicious script from executing.

Finally, PPK has also published a post on IE 8 Beta 2 and its changes.

Related Content:

Posted by Brad Neuberg at 5:59 pm
21 Comments

++---
2.3 rating from 33 votes

21 Comments »

Comments feed TrackBack URI

Canvas tag?

Comment by Nosredna — August 27, 2008

Any chance of new features for future releases after beta 2?
If so, please, the canvas tag!

Comment by ernestdelgado — August 27, 2008

I’d love to see the canvas tag in IE 8. However, I don’t believe it is there currently. There is always ExCanvas (http://code.google.com/p/explorercanvas/). Last I heard though I think that library has trouble if you are on a Standards Compliant page for IE 8, forcing you to shift into Quirks Mode (Ah, the joys of Doctype switching…)

Best,
Brad

Comment by Brad Neuberg — August 27, 2008

How do you do opacity???

Comment by sroussey — August 28, 2008

Excanvas only supports a subset of the actual canvas features you get in the other browsers. On top of that it requires an extra http request, and every canvas tag has to be initialized. Then there is the fact that it is outrageously slow. You can’t really use it for anything like games, well, unless they are board games.
.
There are some cool experiments here: http://glimr.rubyforge.org/cake/canvas.html#KeyboardTest
.
For the most part they don’t work with Explorer Canvas and the couple that do he says become incredibly slow after a few hundred frames.
.
They guy at the link above uses more advanced canvas features than I do, but for simpler things some of the missing features in ExCanvas are directional gradients, gradients with multiple stops, stop opacity, radial gradients, stroke width scaling, and toDataURL(). Then you have the usual opacity issues that is bread and butter for Internet Explorer. If you have a vml psuedo-canvas in a div, where some element in the vml psuedo-canvas has it’s opacity set, and the div container also has it’s opacity set, that element with the opacity set in the vml psuedo-canvas just becomes black. ExCanvas renders strokes underneath the fills where everyone else renders them on top. It’s just one thing after another.
.
Usually someone has chimed in at this point about the SilverLight plugin, which completely kills the point of Canvas in the first place, i.e., no plugins. Not to mention SilverLight is 4 times slower than HTML and 6 times slower than Flash. http://www.craftymind.com/guimark/
.
…and that is against HTML in Internet Explorer. I can’t imagine what it is like compared to modern browsers like Firefox and Safari.

Comment by GregHouston — August 28, 2008

Here’s the entire effort I am willing to put into handling IE8 users:

`
if (strpos($_SERVER['HTTP_USER_AGENT'],”MSIE 8″)) {header(“X-UA-Compatible: IE=7″);}
`

Fixes everything. Makes IE8 work exactly like IE7.
Standards my a**. If it renders right in Opera it’s standard.

Comment by ck2 — August 28, 2008

Lol. I don’t usually read Google Ads, but for some reason I did just now. Two of the “relevant” ads on this page are for how to “Fix Internet Explorer”. One was for how to “Repair Internet Explorer”, and a fourth, my favorite, help with problems uninstalling Internet Explorer. I wish fixing Internet Explorer was as easy as clicking on a Google Ad. Though Google still amazes me, maybe one day it will be that easy. They did create ExCanvas, which despite its shortcomings made it possible for me to use canvas in the first place, and I am still amazed that I can have a semi-functional conversation with people who speak entirely different languages via Google Translate.

Comment by GregHouston — August 28, 2008

Pff it’s hard to get used to… Seeing IE and web standards in one sentence, who would have dreamed about that. ;)

Comment by V1 — August 28, 2008

I hope that they will reconsider supporting the opacity style and that they do at least a few more betas and release candidates before they go final since IE8b2 is still far from compatible with other browsers.

Comment by Spocke — August 28, 2008

Ie 8 has lots of bells and whistles, which are good for end users, but for us developers it seems will add not one but two additional rendering modes: IE8 and IE7.5.
That is because, at least on my pc, a page with

without the x-ua/compatible header, renders differently in ie7 and 8.
I am heavily using canvas and explorercanvas, and while I managed to have a page working in the same way in FF2&3 and Ie7, the very same page breaks in ie8 (no canvases at all) unless switching to quirksmode which then uses the ie box model screwing all the rest of the page. What the heck…..shouldn’t ie8 behave like ie7 if you don’t use the x ua header?
Maybe it happens only to me, or maybe I have to use some more incredibly clever meta tags, but I cannot believe Ie8 can not support ie7 rendering modes without introducing new bugs thus giving a ie7.5 mode. Groan. Big deal.

Comment by moondogx — August 28, 2008

ops the doctype I inserted in the post has been removed….
the post should read:

That is because, at least on my pc, a page with
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
without the x-ua/compatible header, renders differently in ie7 and 8

Comment by moondogx — August 28, 2008

document.addEventListener is undefined

Comment by Jeria — August 28, 2008

@moondogx: the behavior of IE8 is to break backwards compatibility with IE7 UNLESS you send the X-UA-Compatible header or meta tag.

Comment by Joeri — August 28, 2008

@joeri: I wasn’t aware they changed their mind…at the beginning they (ie8 team) said they didn’t want to break the web again (as they did in ie7). I must have lost some posts in the ie8blog..! Glad they changed their minds

The bad side is that what I wrote in the previous post is nonetheless valid: either using “IE=EmulateIE7″ or “IE=7″ DOES NOT give the same results as in IE7, and that’s a problem.
On a genuine “ie7″ explorercanvas does work, in ie8 with either “IE=EmulateIE7″ or “IE=7″ does NOT.
We just got IE 7.5

Comment by moondogx — August 28, 2008

There are some really great developer improvements in this release. Check out the updated version of IE Developer Toolbar, its awesome (not as awesome as Firebug but goes a long way in making IE debugging manageable). I usually use IE8 running in IE7 mode just so that I can use the updated toolbar, wish they would back port it to IE6.

Comment by andykant — August 28, 2008

Still no css opacity? MS is really evil… or absolutely crazy. I still think someone should create an active x or whatever plugin for IE to use the Gecko or Webkit engine. A Webpage would simply have to trigger the plugin. This should be technically possible and if the plugin download is as small and seamless as installing the Flash plugin, there would be large acceptance.
MS is still trying to slow down the open web, to propagate Silverlight. There is no other explanation why a company as big and resourceful as MS can’t create a modern feature rich web browser.
With IE8 MS perverts what the web developers wanted for years: standard compliance. They do this by following the standards from years ago, ignoring, that things like “opacity” are essential today. IE8 has no CSS 3, no Canvas, no SVG, … I don’t see the light.

Comment by AndiSkater — August 28, 2008

I have a new Modern Browser rule.
.
Nosredna’s Modern Browser Rule
.
If there is a feature that is implemented in at least two of the other browsers, you shall not ship a new version of your browser until you implement it.

Comment by Nosredna — August 28, 2008

Nosredna’s rule would have delayed firefox 3.0 considerably.

Comment by Breton — August 28, 2008

>>Nosredna’s rule would have delayed firefox 3.0 considerably.

It would have changed priorities.

Comment by Nosredna — August 28, 2008

it seems, that is IE8 is just an “upgrade / downgrade” of the browser interface, and not an update of the engine. They are focussing on the wrong part of web browser development.

Microsoft and its monopoly position is the only thing that stops us webdev’s from creating more powerful, advanced, and LIGHTER apps.

They say they follow w3c, i think they mean.. They have read it and implemented a Microsoft version of it.

Comment by V1 — August 29, 2008

I have an ajax app that is being broken by the x-xss-protection “feature” of IE.

I have tried setting the x-xss-protection header to 0 and verified its in place but it does not disable the stupid feature!

It breaks a request I make to a hidden iframe to generate page content.

anyone had any luck getting legit apps through this feature?

Comment by k1n6 — January 13, 2010

Leave a comment

You must be logged in to post a comment.