walls.corpus

By Nathan L. Walls

  • Sunset, Jan. 2, 2021/Williams Township
  • On Bougher Hill/Williams Township
  • Sunrise, Dec. 19, 2020/Williams Township
  • Sunset, Dec. 27, 2020

IE and JavaScript MIME-type lessons

I’m a jQuery-fan and I recently wrote some forms for CrazyLikeThat using jQuery and AJAX. The goal was to use a Rails application I wrote as a service.

I hit a few roadblocks, though and in solving them, learned some things:

  • While ‘application/javascript’ may be the recommended type attribute to source in Javascript with the >script /< tag, IE doesn’t follow it. Regardless of what MIME-type your server sends JavaScript as, you have to specify 'text/javascript’ to IE.
  • IE8 has three rendering modes, and there are implications for how to interact with the DOM based on which mode you’re in.