Jun 18, 2009

How I Fixed "IE 7 cannot open the Internet site - Operation aborted" error!

It all started from a reader’s email this morning. Duane Cantera reported: “When I try to open this web page I get an error message in internet explorer and the operation aborts.”

Emails like these are strange. They can send a blog owner into panic mode much quicker than an earthquake warning can possibly do; I was no exception. Before I knew, I had already opened Internet Explorer 7 and was opening the URL. The page started loading, as my eyes remained glued to the monitor screen and for a moment my heart raced like a speeding bullet. And boom! IE 7 crashed with “Internet Explorer cannot open the Internet site. Operation aborted.” message [here is a screenshot]. Clicking the OK button displayed "The page cannot be displayed" instead, thus restricting anybody from opening the blog URL! This was really shocking as well as unexpected for me. Shocking, because my blog was crashing in Internet Explorer [around 35-45% of my visitors use IE, mind it]. And unexpected, because I had NOT touched my blog template (HTML code base) in months, thanks to my current hectic schedules. And still here I was. All I could remember, my blog was working fine in IE 7, the last time I had checked. Hence, I was spellbound regarding what must have caused this. Instinctively, I did a Sitemeter and Google Analytics check and saw a 40% decline in my blog’s recent page visits. Damn! Must have been due to this IE crash.

But when all this was happening, the tester inside me was telling me not to panic and be rational. Quickly, I did a Google search for the above error message in IE and came up with some informative references. It looked like; it was an old bug in IE and could happen if your web page had many JavaScript code snippets (which I had many). But, still I had not edited my blog template in months. So the chance of this being a regression bug was almost impossible, in my case. Few more minutes of Googling and I came to know that this error has been reported and is now a "Known Issue for Blogger".

» I tried to follow Blogger’s recommendation to remove the “Follower’s widget” but in vain. I could not get rid of the crash.
» The more I searched in Google, the more suggestions I saw; to move all your JavaScript tags below the body tag, adding defer="defer" to your JavaScript tags… I tried them all, but still in vain.
» Even I saw suggestions to redirect the readers to Mozilla page to download Firefox. I considered this option for a while but felt that it would be too intruding for the readers.
» I searched for a patch from Microsoft so that I could redirect my readers with IE 7 there. I could not get hold of one. Instead, I came across a suggestion from Microsoft to upgrade to IE 8 instead.


I was getting tired and frustrated by now and decided to get back to my blog template code and see if I could find out the cause that was causing this mysterious crash. All I knew at this point was that this was happening due to a bug in IE 7 that caused errors while parsing the JavaScript. I didn’t have the luxury of loosing 40% of my blog readers just because Microsoft IE 7 had a bug in it and was having trouble parsing my blog template. As far as I knew, IE was able to parse my blog template till recently. As I had not made any changes myself, it had to be some third party script that must have changed and was causing this error out of the blue.

Initial investigation/testing into this issue suggested that:

» This was a problem with ONLY Internet Explorer 7 (and earlier versions) and not in Firefox, Chrome, Opera or any other.
» My blog’s homepage was opening fine in IE 7, but not the individual archived "post pages”. This gave me a test idea. I tried opening the label pages. And wow! They opened fine in IE 7.

This showed that it must be some JavaScript code snippet that was there on my “post pages” but was not on the “home”, “label” or “search” pages and was causing IE 7 to crash. I do use conditional display of some JavaScript widgets in my blog [using b:if cond='data:blog.pageType == "item"' tag]. But before scanning them, something else struck me as the possible culprit that differentiated my blog “post page” and rest pages. It was the “Comment Form”! Few months back, I had switched to the “Embedded Comment Form”. It had been working fine after an initial glitch (even in IE 7). But, it was also the one thing that stood out as the difference (as far as JavaScript code was concerned) between my “post pages” and rest pages. So, as a test, I changed my comment settings from “embedded comment form” to “pop-up”. And hurray! When I opened my “post pages” in IE 7, I no more saw any crash/errors. So I conjecture that Google/Blogger must have made some server side changes that affected it’s JavaScript code snippet that handles the “embedded comment form” and in turn it was crashing IE 7. I personally liked the embedded comment form and found it more user-friendly than the pop-up version. But for now, I have to change back and wait until either Blogger fixes it’s JavaScript OR Microsoft fixes the bug in IE 7 (the chance is low, as they have a newer non-crashing version in form of IE 8). So, I am hoping that Blogger fixes their embedded comment form code soon so that I (and many bloggers like me) can again use it without crashing our blogs in IE 7!

I must admit, it was a great and thrilling experience. Being a tester, it was frustrating to see my own blog crashing like a pack of cards in Internet Explorer. Though, the problem was with a problematic parsing error on the part of IE and a possible JavaScript error at Blogger’s end, ultimately I was loosing visitors to my blog. And it really feels great to have fixed the problem at my end in just 6 hours [Microsoft is yet to fix it in IE7 even after 1 year, and Blogger is yet to come up with a solution, mind it :)]! If you are a blogger and experiencing this problem, try if this post can help you fix it. And thanks a ton to Duane, for alerting me about this error.

Update1! Looks like the fix was not good enough to support IE 8! This is irrespective of Microsoft's claim that IE 8 has the fix that should take care (handle parse errors more gracefully by hiding them to the status bar and allow the user to continue browsing the web page) of the issue in IE 7. Thanks to Mistah Bonzai for alerting me about it. I have upgraded to IE 8 now and I could reproduce the "Aborted Operation" error, even though I was on Windows XP. Damn! Now what? Well, I don't know! Let me investigate more into this and I will update this post as soon as I have new information.

Update2! Looks like Blogger (read Google) and IE (read Microsoft) have signed a secret "no-offense; let's be friends" agreement! Out of curiosity, I reverted back to the Embedded Comment form recently and now IE seems to behave nicely without any "Operation aborted" error. I have confirmed this in IE 6, 7 and 8. And all 3 of them work fine with Blogger's Embedded Comment form now. I am hoping that this is a permanent fix. I will keep testing this compatibility from time to time and update this post in case I find anything unpleasant.

Happy Testing…