W3C works to standardize XMLHttpRequest

    Kevin Yank

    The World Wide Web Consortium‘s (W3C) new Web API Working Group has released a working draft of the official specification for the XMLHttpRequest object, which is at the heart of AJAX.

    The XMLHttpRequest object, which enables JavaScript code to make requests to the server and process the responses, is supported in most current browsers, including Mozilla/Firefox, Safari, Opera, and the upcoming Internet Explorer 7. Internet Explorer 5/6 offers the functionality of XMLHttpRequest through an ActiveX control of the same name.

    According to the draft, the first version of the specification aims to document the cross-browser functionality that is currently available only. Features that only exist in one browser will not be included in the specification, nor will any new features. In the few cases where the various browsers disagree on how a given feature should work, the specification will describe the “most correct” behaviour, as determined by the spec’s authors. What should result is useful documentation for web developers of just what they can rely on and use today. At the same time, the document will provide a target that will enable new implementations to ensure interoperability.

    Prior to this W3C spec, the only vendor-neutral specification for just what XMLHttpRequest should do was to be found in the Web Hypertext Application Technology Working Group’s (WHAT-WG) Web Applications 1.0 Working Draft specification, which contained plenty of ambiguities and issues. Heavily based on the WHAT-WG’s work, the W3C’s spec cleans up many of those issues, and is generally a more solid foundation for developers.