IE ‘operation aborted’ error

One of the most under­rated prac­tice for a web devel­oper is to con­stantly check the web page on all the browsers and make sure every­thing is ren­der­ing as you expect it to. It becomes more impor­tant for dynamic con­tent pages such as blogs where new scripts, wid­gets can irk a spe­cific browser. More often it is with IE and the prob­lem is wide­spread since many web devel­op­ers pre­fer Macs (and really very few peo­ple have IE on macs), Mozil­las and Safaris; often ignor­ing IE. How­ever, the bot­tom line is to do fre­quent browser checks to catch the error before a reader does.

ie-error

One of the com­mon IE bugs that creeps in is the ‘Inter­net Explorer can­not open the web­site .….; Oper­a­tion aborted!’ error. Lately, it had sur­faced in my blog because of an embed­ded CNN video that used javascript inside body tag.

The rea­son for this error is that javascript inter­feres with the load­ing of page by try­ing to load ele­ments before the page has been fully parsed. The com­mon solu­tions are to move the script out­side the body etc. How­ever, in blogs where the page is dynam­i­cally gen­er­ated and I don’t want to put in too fancy hacks, the eas­ier work around is to do a con­di­tional browser check for IE and load the script only if it is a non-IE browser else dis­play a sim­ple link.

For eg.

<![if !IE]>
<script .. /> /* let the script load if non IE browser */
<![endif]>
<!--[if IE]> /* only IE will parse this and display a normal link */
see this <a href="">link</a>
<![endif]-->

For more infor­ma­tion on browser checks, fol­low this.

This will, of course, work only if you are fine with not embed­ding the cul­prit video in IE. I hate hav­ing to tweak my pages for IE but then, I hate see­ing the pages break too and would rather put in that extra effort for ensur­ing wider browser com­pat­i­bil­ity because we are far from wit­ness­ing IE get­ting extinct any­time soon. The javascript issue can be caused by videos, google maps etc. So, keep an eye when you pub­lish a new post with js con­tent enabled.

P.S. — A good tool to check how your design ren­ders on var­i­ous browsers with­out hav­ing all the browsers installed is Browser-Shots. It has a mul­ti­tude of browsers to select from and should do a quick job for you.

Share and Enjoy:
  • Digg
  • Facebook
  • Google Bookmarks
  • email
  • Twitter

No related posts.

This entry was posted in web design and tagged css, hacks. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

5 Comments

  1. KnightRider
    Posted May 27, 2009 at 11:42 pm | Permalink

    Your IE reader.. finally sees the blog.
    Good job, fig­ur­ing it out :)

  2. moz
    Posted May 28, 2009 at 7:06 pm | Permalink

    oh shush, IE is the best!

  3. Webbster
    Posted July 10, 2009 at 2:39 pm | Permalink

    Found this entry after a google.

    Thanks for post­ing this, I’ve imple­mented it on affected sites and used it to hide the javascripts that so offends IE.

    I know it’s not a fix, just a sort of workaround, but until those dum­b­asses at Micro$oft can fix theip POS browser — or bet­ter yet — if every­one switches to Fire­fox or Chrome then I will not have to waste any more of my afternoons !

  4. Posted July 15, 2009 at 12:56 pm | Permalink

    You’re wel­come. The dif­fer­ences between browsers is def­i­nitely a pain for the devel­op­ers, I hope they agree upon some stan­dard way of doing it.

  5. Posted June 11, 2010 at 9:08 am | Permalink

    I wrote a sim­i­lar blog about this sub­ject but you did a bet­ter job :)

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting