Operation Aborted Message in Internet Explorer
After rolling out McKNet Connections and integrating social and traditional search platforms, some of our users began seeing the message “Operation Aborted” in Internet Explorer 6 and 7. If they had “Friendly HTTP Errors” enabled, they would then see the friendly page for a 404 error. If not, they would remain on the search results page looking at a normal body of output.
This took several months to diagnose and fix because:
a) It was intermittent. Most of the people who reported it could not reliably reproduce the scenario every time.
b) Inspection of page elements being returned across the HTTP stream were identical whether the “operation aborted” message appeared or not.
c) We weren’t doing anything very fancy – just launching a bunch of AJAX HTTP calls to get metadata about the search results.
Finally, I had a breakthrough last Friday when I read Microsoft KB article #927917. It indicated a possible occurrence was because a child container HTML element tries to modify a parent container that was not yet closed. The solution Microsoft proposed was upgrading to IE 8. Back in reality-land, I had to come up with another option.
Upon inspecting the code, I noted that we were updating the innerHTML property of various elements as a result of several web service calls. To increase performance, we began triggering these calls as they were realized on the page. These calls were nested in various DIV containers and it dawned on me that perhaps some of our clients were getting responses back from the asynchronous call before the calling block’s DOM element was closed.
As a test, we removed the 10 calls that were taking place and found that users with the issue continued to experience it in Production, but not in this new test code. The next step was to build an array of calls and then trigger them once the DOM section was closed. Again, we tested this with our users and found that the full functionality had been restored and no errors were experience.
The lesson learned here was to defer AJAX calls until the DOM blocks they would be updating has completely loaded.