2

I have a web application that uses ajax with prototype.js (Ajax.Updater).

new Ajax.Updater('someID','/some/url',
    {
        asynchronous:true,
        evalScripts:true,
        parameters:Form.serialize(Event.element(event).form),
        requestHeaders:['X-Update', 'someID']
    }
);

Some (not all) IE9 users experience a strange phenomenon.

  • UserAgent of normal (non-ajax) HTTP requests indicates that the browser is IE9, not in Compatibility View.
  • UserAgent of ajax HTTP requests indicates that the browser is IE7 (IE9's Compatibility View).

I want to force the browser not to use Compatibility View in ajax HTTP requests, but the html already has a meta tag : <meta http-equiv="X-UA-Compatible" content="IE=edge">.

Does anyone know the reason or workaround?

t_motooka
  • 555
  • 5
  • 12
  • 1
    Similar question: [IE8 forces compatibility mode when inserting data into a div](http://stackoverflow.com/questions/3614286/ie8-forces-compatibility-mode-when-inserting-data-into-a-div). Maybe some markup/styling in received HTML fragment forces IE9 to go into compatibility mode? – Victor Dec 07 '12 at 10:26
  • Thanks, @Victor. I will investigate HTMLs, but it may take long time... – t_motooka Dec 09 '12 at 22:52

1 Answers1

3

This is a possible solution - but not fully researched - try setting

Header set X-UA-Compatible "IE=edge"

in your httpd.conf or .htaccess file - this will add the X-UA-Compatible header to all responses from Apache to force IE not to use Compatibility Mode

Geek Num 88
  • 5,264
  • 2
  • 22
  • 35