Can't Upload Files or Images in Drupal with Internet Explorer 9

Microsoft made a lot of changes in Internet Explorer 9, both in how it handles web standards (big improvements!) and how it handles Javascript. However, after the IE9 began rolling out, clients began calling and complaining that they could no longer upload images or files on their Drupal sites.

Strange, because to us, everything was working just fine and since we use Firefox and/or Chrome here in our office, the IE9 update was just a passing blip on the radar.  But after walkingwe finally narrowed the prob

Which gives a lesson we need to reminded of over and over again. The first question with any web problem should be: What browser are you using?

Anyway, here is the quick and dirty fix for the problem. You need to make IE9 think it is really IE8 and then everything works fine again.

Solution #1: Meta Tag

Insert the following meta tag into your template file, probably page.tpl.php.

<meta http-equiv="X-UA-Compatible" content="IE=8" />

Solution #2: .htaccess addition

Put the following at the end of your .htaccess file. If you have access to your server files, this is probably the best way to go.

BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support

Problem solved.

Magento users had similar javascript problems with IE9, although for them, it was breaking their credit card entry on the checkout page - and when people can't pay, well, there goes the main reason for an ecommerce site.

logo_inverse

is loading the page...