Compatibility view in IE (don't judge me)

Hi All, I’ve used Grav as a landing page for a client and a lot of their client base use IE. His office has compatibility view set as default (Don’t ask me why!) and the site is not displaying properly.

I’ve explained the whole developing for modern browsers etc etc but he’s still asking why many modern websites display fine in compatibility view and Grav does now. I’ve even noticed the main Grav website is out of whack in compatibility view.

Given that many modern websites view fine in IE and IE compatibility view, but Grav does not… how can I get around this with this particular client?

It all depends on the theme used, as it completely defines the HTML generated. I am not familiar with the topic, but you might start from inspecting your theme output.

Grav itself does not output any HTML, but leaves the job to the theme.

This I understand but it seems that most themes within the downloads area don’t display in IE for compatibility view, even the Grav built ones.

For example if you look at these themes in compatibility view, they’re all displaying incorrectly.

One page demo site
Twenty | Twenty
RTFM template
Boxify

Plus many others that I’ve checked.

Trust me, I’m all for modern browsers and this is the first time I’ve come across this from a client but unfortunately some large organisation and government departments still run old versions of IE and also run in compatibility mode.

Would be interested to hear form one of the Grav team to see if there’s a work-around or something that could be tweaked to alleviate this.

As an open source project, we simply dont have the resources to support old versions of IE in our themes. Most of our themes are direct ports of other free themes, and as such, we port them as-they-are. With whatever support they offer.

If you want to develop a theme with support for older IE versions and even gasp, compatibility mode, you are totally able to do that with Grav. You will just need to do it yourself :confused:

Not that I expect too many people will need this fix but I managed to solve it by adding

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

to the user/yourtheme/templates/partials/base.html.twig file and now it’s rendering nicely in IE compatibility mode.

Although it’s worth noting that hmtl 5 videos will not render in this view.