XMLHttpRequest
was invented by Microsoft's Outlook Web Access team. This highly innovative team previously gave us remote scripting, which was the the beginning of "AJAX" style development. Remote scripting was like JSONP, but overly complicated (it used a Java applet, of all things). I don't remember whether it was possible to dynamically inject <script>
elements in IE 4 or 5, but it seems like that wasn't possible. Otherwise, JSONP seems powerful enough to eliminate the need for XMLHttpRequest
.
The Outlook team was transferring XML from server to client, so the ActiveX control was named to reflect its primary use at the time. It was included as part of the MSXML parser.
By the time Firefox got in on the game and implemented their own version, XMLHttpRequest
was being used more like it is today, and less for XML, but Firefox used the same name anyway. With the two biggest browser makers creating an object with the same name, interface, and functionality, the w3c stuck with the existing name. It's too bad someone didn't make more of a stink about the misnomer and insist we call it something more accurate like just HttpRequest
.
I don't know how or why "AJAX" became the popular term to describe the programming style where a web page interacts with the server without requiring a complete page load. "AJAX" is a worse misnomer than "XMLHttpRequest" since it not only implies XML is an essential aspect, but further provides no indication of server interaction. I can process XML with JavaScript asynchronously without ever communicating with a server.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…