rob cherny.com

About

My name is Rob Cherny and I'm a professional Web Developer with 16 years of experience creating Web sites and Web-based applications. This site is where I write about my work, and random other things...

Learn More

Loading...

Close Tab

Web Development

New Web Development Features in IE8 Beta 1 for Developers

So, Microsoft released IE 8 “beta 1 for developers” yesterday. You can get the IE8 beta by downloading it from their site of course. You can also read a ton of information at their readiness site.

There are great introductions there, but you get the most detail out of the whitepapers on IE8.

But, what kind of guy would I be if I made you read all that stuff? Instead, I stayed up late last night …

New Developer Features in IE8

IE 8, beta 1, is really a leap forward. After announcing they’d stick with their new standards mode in the new release, everyone was of course left scratching their heads as to what that meant. Well here’s the quick and dirty of it.

Oh, John Resig hit on some of the biggest points I could find too, if you wanted to head over there and read… otherwise…

By the way, an exciting factor in all of these features is that a number of these features are from the HTML5 spec. Go Microsoft. About time we saw some progress!

Version Targeting and Rendering Mode

The usage of the Meta and HTTP Header X-UA-Compatible works, as I’ve played with this already.

Additionally, there’s a GIANT button on the tool bar which allows users to render the site like IE7. That appears to work too. Appears there’s some way to toggle rendering modes in the developer’s tools as well (view menu?), however I haven’t seen it.

But that’s a different post, there’s actually some gotchas…

Full CSS 2.1 Support and More in IE8 beta 1 for developers

Microsoft claims they’re gunning for full CSS 2.1 support. Already IE7 supports a few of the more useful CSS3 proposed selectors (attribute sub-strings). Some of the cooler 2.1 features they say they’ve included are:

  • Generated Content
  • Counters
  • Outline Property
  • Table Display – not clear beyond ‘inline-table’ what will be supported but if they include ‘table-row’ and ‘table-cell’ it’ll be pretty exciting
  • Box-sizing
  • Vertical text
  • Seriously beefed up Print Media support

Ajax Enhancements in IE8 beta 1 for developers

Some serious stuff here, and some of it is on the complex side.

  • Ajax navigation – this includes updates to window.location.hash (#) as well as the first browser to support the hashChanged event
  • DOM Storage – with key/value pairs up to 10mb
  • Connectivity Events – for offline applications
  • More connections – Up to 6 connections per host based on different scenarios
  • XMLHTTPRequest (XHR) Enhancements – including timeout values
  • Cross Domain Request Model (XDR) – different than Firefox 3’s proposed model
  • Cross-document Messages (XDM) – messages sent between frames

JavaScript Enhancements in IE8 beta 1 for developers

  • Many DOM enhancements and bug fixes, including the differences between attributes and properties being correctly represented
  • Getters on some types of objects are fixed, such as getAttribute(‘style’) returns the string as opposed to the object now, as it should be from the spec
  • URL handling in getAttribute() and setAttribute() is true to the code now (meaning you get relative with attributes if coded that way and you get absolute with properties)
  • document.getElementById() only works on ID’s now as opposed to names

HTML and CSS Improvements in IE8 beta 1 for developers

  • IE8 passes the Acid2 test
  • Paragraph elements are properly closed in the DOM when the closing tag is omitted
  • MS removed hasLayout which was a headache for everyone building CSS-based sites with IE
  • Enhanced Object element support
  • Support for “data” URI’s inline in the code

CSS and JavaScript Query Selectors API

This may be one of my favorite enhancements. Microsoft has added basic support for the W3C Selector’s API. What does this mean? This means all the work that libraries like jQuery have been doing to hack in JavaScript DOM selectors will ultimately be optimized with near-native stuff. John Resig thinks there’s headaches there, but basically you’ll get two methods if you’re doing stuff yourself:

  • document.querySelector() – accepts a selector statement and returns the first DOM element match or null
  • document.querySelectorAll() – accepts a selector statement and returns a static node list collection or an empty collection (static means if the DOM changes, you must query again)

This rocks. Firefox 3 supports document.getElementsByClassName(), but IE just one-upped them. However, Microsoft pointed out that they will not support XPath selectors, and Firefox does and has for a long time.

Ok, so I’ve linked to John Resig a few times today, he’s got good content, what do you want from me?

A word to the wise if you look at this, they left out Namespace support …

Random Stuff

  • An IE8 Developers Tool similar to Firebug. No, really, it’s pretty cool: includes a JavaScript debugger, CSS cascade reference, and live edits and everything!!
  • Supposedly they’ve addressed memory leaks and stability (we will see. Er, oh was that my outside voice?)
  • Leaks were an issue with JavaScript closures and other techniques, which have been cleaned up
  • If one tab crashes, the others are supposed to be unaffected
  • Something called Activities
  • Something else based on Microformats and the hAtom spec called WebSlices
  • Increased namespace support, so things like SVG and MathML may be possible
  • Lastly, and this deserves more than a footnote bullet, but supposedly they’ve added ARIA support, which will be HUGE boon to RIA development everywhere… but that’s another article. Best part to note there is that will improve accessibility with everything from Screen Readers to … well everything, and they’re not the first to support it, so combined with other browsers we can count on some real features going forward

Conclusion

I think IE8 is gonna be big. They’ve added a ton of new features, some of which other browsers have had for a while, but it just means they’ll be that much easier to use in the coming months and years. For that, I’m excited. Time will tell if it’s a good browser or if it does anything for market share.

As far as I’m concerned, the richer the browser market the better, and this certainly makes the market more rich. It’s good for competition. Considering that IE8’s “standards mode” is supposed to be a virtual rewrite, and the DOM and CSS support virtually rewritten, after browsing a few sites, I’m impressed considering it’s a first release. I wouldn’t be shocked if some of the code bits in here were included in the new WYSIWYG for Visual Studio.NET or Expression Web, but that’s pure speculation.

As a browser and development platform, we will see.

Mar 6, 11:45 AM in Web Development (filed under Browsers, Microsoft)

commenting closed for this article

In This Section