In an unfortunately incident, I discovered a problem caused by the bit.ly Preview Firefox plugin…
A friend of mine called me saying that his blog was down. It was coming up fine in every browser except for Internet Explorer 7. After spending a good hour or so looking into the problem, I discovered a very bizarre problem that was caused by the bit.ly Preview Firefox plugin…
(A Firefox plugin crashing IE7. Yeah, right… But let me show you…)
He had copied another page and pasted into his blog using Firefox. He had accidentally copied the bit.ly preview <script> code along with it.
Once the blog post was published, then it caused a very NASTY and hard-to-debug problem with Internet Explorer 7. Specifically, it forced IE7 to issue an “Operation Aborted” error, and then refuse to load the page at all.
Here’s an example of an offending page. Load it in both Firefox and IE7 to see what the issue is.
http://www.rkrishardy.com/js/samples/bitlypreview_ie7crash.html
Here is a screen capture of the “Operation Aborted” alert:

This then fails to IE’s worthless “cannot display this webpage” page…

I have brought the problem up with bit.ly, and don’t know whether or not they are going to fix it, but they do now know about it. From the discussion I had with them, I may have been the first to bring it to their attention.
Here’s the problem:
The bit.ly tracker javascript at https://s.bit.ly/bitlypreview.js contains the following code:
// This load file is injected by the preview plugin.
_load = function(u) {
var e = document.createElement('script');
e.setAttribute('language','javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src',u); document.body.appendChild(e);
}
_loadCss = function(u) {
var e = document.createElement('link');
e.setAttribute('type', 'text/css');
e.setAttribute('href', u);
e.setAttribute('rel', 'stylesheet');
e.setAttribute('media', 'screen');
try {
document.getElementsByTagName('head')[0].appendChild(e);
} catch(z) {
document.body.appendChild(e);
}
}
_loadCss('http://s.bit.ly/preview.s3.css?v=4.22');
_load('http://s.bit.ly/preview.s3.js?v=4.22'); // +"&t="+(new
Date()).getTime()
The culprits in this file are the document.body.appendChild(e) and the document.getElementsByTagName(‘head’)[0].appendChild(e) commands.
Each of these cause IE7 to issue “Operation Aborted” errors since IE7 does not allow javascript to modify any document object model (DOM) objects, such as anything inside a <head></head> tag, if the <script> tag that loads that JavaScript file is not directly within that object or that object’s parent.
No error occurs in any other version of IE or any other browser from the minimal testing that I have done.
SOLUTION:
Look for any data on your server that contains ‘bitlypreview.js’. Make sure to check your html files, php scripts, and your database. If you see bitlypreview.js anywhere, remove the entire <script> tag that contains it.
This will require admin access to your database (such as using phpMyAdmin or MySQL Query Browser or some other tool for your database) and familiarity with hand-writing database queries.
Once you have the stray entries removed, you should be OK!
Next, make sure you vote on this bug at bit.ly’s suggestion forum.
Let me know if this helps!
-Kris




