Internet Explorer Error -1072896658

By | June 14, 2007

I found a strange bug lately. I’m currently working on a website that I’m building Ajax in. Just to do some fancy shit, nothing special. But to my amazement I started getting a scripting error with the funny content ‘System error: -1072896658’.

Thank you Microsoft, for giving me that much information on what the f*ck is going on. Parden my french.

The strange thing is that the code used to work. So I new the JavaScript itself wasn’t broken. So what was???

Took me a little of searching on the web to figure out that sometimes IE is trying to be smart. It will try to decode the character set of incomming data. Which means that if it can’t it will crash. 🙁

In my case this happened when calling the .responseText of the Ajax call. Appearantly my webserver didn’t include the charset by default. (Which is my fault as I configured it) But that shouldn’t be a problem. Except for IE that is!

Solving it is a lot easier though. Just set the charset in the response header. With PHP you can do this as follows:

header("Content-Type: text/html; charset=UTF-8");

That little line caused me hours of work! All thanks to the very vague messages of Microsoft.

One thought on “Internet Explorer Error -1072896658

  1. Zack

    Wow. Hey, this is for you:

    for ($i=0; $i < INFINITY; $i++)
    echo “thank you!!”;

    I read about this bug at 5 other discussion forums with no solution posted.

    With just one easy line, you ended my frustrating search so I can get back to real coding.

    Keep up the great blogging.



Leave a Reply