Compatibility Mode - can I turn it off?

Compatibility Mode - can I turn it off?

by Sam Thing -
Number of replies: 8

Compatibility mode in IE8 (which my college is running) seems to break perfectly valid CSS. Is there code/script I can use on a page that can turn off compatibility mode?

Thanks.

Average of ratings: -
In reply to Sam Thing

Re: Compatibility Mode - can I turn it off?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi Sam. No idea about script as I'm not a developer but just be aware that turning compatiblity mode off will bring with it other issues in Moodle if your users choose to use IE8. For example -they can't make more than one link in the text editor unless they turn compatibilty mode on -which has confused a good many people - see question 4 of course FAQ here http://docs.moodle.org/22/en/Course_FAQ

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Compatibility Mode - can I turn it off?

by Sam Thing -

Thanks Mary, that one's been foxing my boss for months now ;)

In reply to Sam Thing

Re: Compatibility Mode - can I turn it off?

by Sam Thing -

After Mary's answer above ^^^^^, I guess what I need to know then is how do I write CSS that won't be broken by compatibility mode???

I'm off to do some googling but all input greatfully recieved.

 

Sam.

In reply to Sam Thing

Re: Compatibility Mode - can I turn it off?

by Mark Ward -

Internet Explorer 8 will dump you into compatibility mode on any "intranet" site. You can get around this in a few ways:

  • If it is only affecting a small number of users you can instruct them to change their settings locally by clicking on “Tools” (near the top right), and then selecting “Compatibility View Settings”. Within this dialogue ensure that the bottom two tick boxes are un-ticked and then “close”. The page should reload in normal view.
    3lnwN.jpg
  • If you have confident network admins they can add a group policy configuration to disable this through Active Directory. See this.
  • You can define the document type as IE-EDGE as has been suggested above and this should force the browser to render things correctly. One important note on this is that Moodle will still tag the browser as IE7 in the body classes so any conditional formatting from the theme will still be applied. Not so good sad
Hope that helps
In reply to Mark Ward

Re: Compatibility Mode - can I turn it off?

by Stuart Lamour -
Picture of Plugin developers

anyone know if setting the X-UA-Compatible in the .htacess makes the moodle body class behave corectly?

(from html5boilerplate)

 
<IfModule mod_headers.c>
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
    Header unset X-UA-Compatible
  </FilesMatch>
</IfModule>

https://github.com/h5bp/html5-boilerplate/blob/master/.htaccess 

In reply to Sam Thing

Re: Compatibility Mode - can I turn it off?

by Sam Thing -

Thanks for all the answers. No one has quite solved my original problem but collectively you helped me find the solution myself and given me another, more interesting avenue of moodle dev to walk down.

Thanks again.

Sam.

In reply to Sam Thing

Re: Compatibility Mode - can I turn it off?

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Sam,

A quick search reveals this:

http://twigstechtips.blogspot.co.uk/2010/03/css-ie8-meta-tag-to-disable.html

which might be similar to what has been stated, but then I remembered a similar issue with a thing called the 'Byte Order Mark' (http://tracker.moodle.org/browse/MDL-31343) which was causing the 'DOCTYPE' to be ignored because some plugins (including mine) were not saved correctly in UTF-8 format causing it to be ignored and in this case chucking IE9 into quirks mode which could be happening here.  Also have a look at:

http://msdn.microsoft.com/en-us/library/ie/cc288325(v=vs.85).aspx

to see if that gives more information.

Alternatively, kindly ask the college to install and use a proper web browser ;).

Cheers,

Gareth