Thursday, July 20th, 2006

XMLHttpRequest Case-Sensitive in IE7

Category: IE, XmlHttpRequest

Sleepyhead has posted a quick note about the XMLHttpRequest support in Internet Explorer 7, some bad news – it’s case-sensitive.

The native XMLHttpRequest object in IE7 is case-sensitive. This is no big surprise – however that was not the case with the XMLHttpRequest active-x object in earlier versions of IE. So if you have old code that used uppercase in method/functions that worked with IE6 you have to change it for it to work in IE7. Took me a while to figure out why an old script of mine wasn’t working…

He gives the code example for his fix, noting that “Status” will no longer be the same as “status”.

Posted by Chris Cornutt at 6:59 am

3.6 rating from 37 votes


Comments feed TrackBack URI

[…] Esto está sucediendo con la última beta de IE7, en el cual las pruebas de muestran que el objeto XMLHttpRequest será Case-Sensitive (sensible a mayusculas o minúsculas). No será lo mismo usar Status que status. Via […]

Pingback by aNieto2K - » Objeto XMLHttpRequest en IE7 será Case-Sensitive — July 20, 2006

A very great hint, why did you write it with upper case? Have a look in the documentation and you will never have those problems.

Comment by Isaac — July 20, 2006

I think FF’s XMLHTTP object is also case-sensitive, and a platform-independent ajax application should be built to work with FireFox ;)

Comment by Glamdring — July 20, 2006

Umm… well, just to wrap it all up, JavaScript is supposed to be case sensitive. After all, you wouldn’t do “foobar = new DATE();”, would you?

Comment by Markku Uttula — July 20, 2006

Yes, I am well aware of case-sensitivity being the standard. However, my point was that the active-x object in IE6 is not, while this has changed with the native object in IE7. It’s not a big issue or a surprise but for some this can lead to a problem.

Comment by Sleepyhead — July 21, 2006

So what your saying is by not following the standards set out for the language it caused you problems later on when the sloppy code got picked up on my a browser with better/stricter support.

Can I be the first to say – Well Duuuuuuuh!!!! ;)

Comment by Aaron Bassett — July 21, 2006

[…] Found via Ajaxian. […]

Pingback by XMLHttpRequest Case-Sensitive in IE7 · Style Grind — July 21, 2006

While I agree that following standards is the best way to go, and case sensitivity is something all coders should be aware of, belittling his discovery is not helping anyone. He discovered something that might affect a lot of people out there. if the ActiveX object was not case-sensitive, and someone who was learning how to create a requests saw the wrong example, they wouldn’t know it was wrong. Sure it may be a “well duuuuh” but how many times has a seasoned coder had a “well duuuhhh” moment. I get them all the time. Just think of the n00bs this would help.

Comment by sillywampa — July 21, 2006

Leave a comment

You must be logged in to post a comment.