Web 2.0’s Engine Lacks A Spec No Longer
by Thomas | June 21st, 2007
XMLHttpRequest object which is a Microsoft invention from nearly a decade ago. Anyway given how important this object has become it is time to actually document what it can do; enter the W3C.
The W3C is trying to figure out what
XMLHttpRequest objects (XHRs for short) are actually supposed to do. If you know the ins and outs of XHRs there won’t seem to be anything new here, but the devil is in the details as they say. It turns out when you read closely you find that browsers really aren’t conforming that well. Specific sticklers note that all the various MUST statements made in a specification should work. For example, the conforming user agent MUST support a certain number of HTTP methods, not all do. The
setRequestHeader() method should not allow some headers to be changed, many browsers do. Certain exceptions must be raised by browsers, they mostly aren’t.
What is most interesting though is the specification called “Not in this Specification”. Here you get some pointers to interesting areas both supported by some browsers and actively being worked on. Some gems:
- Timers and timeouts
- Progress events
- Error handlers
- Better request header management
The implication of the cross-domain request possibility is simply fantastic because it will allow for many client-side applications to blossom quickly. But before you get cynical about all the W3C specifications that are nearly as cool that never get implemented take heart, apparently Firefox 3 is about to introduce this feature in the next week or two.
[photo under CC by flickr user erikogan]