1

I work for a private company writing web apps. Most of the web apps were written prior to me and require users browsers' to be in compatibility mode (IE8-10).

For my IE10 users, I'd like to start implementing HTML5 features. Given an application that's in compatibility mode and uses frames/framesets, is there a way I can run in compatibility mode for most of the application but escape a frame and have that run using HTML5? Should I not being using frames to achieve this? Would an iframe work?

The HTML5 frame I'm referring to does work, but only when the browser (IE10) is in standards mode.

Thanks.

  • possible duplicate of [How to forcefully set IE's Compatibility Mode off from the server-side?](http://stackoverflow.com/questions/6546775/how-to-forcefully-set-ies-compatibility-mode-off-from-the-server-side) – JJJ Sep 10 '13 at 12:13
  • @Juhana - not a dup; this question is specifically asking about content within a frame being in a different mode to the parent page; the linked question does not address this. – Spudley Sep 10 '13 at 12:38

1 Answers1

1

is there a way I can run in compatibility mode for most of the application but escape a frame and have that run using HTML5?

No, you cannot. A frame will always inherit the parent page's document mode.

Should I not being using frames to achieve this? Would an iframe work?

Ideally you shouldn't be using old-style frames for anything; they've been considered obsolete for a very long time. That's probably outside the scope of this answer though.

But no, switching to an iframe won't make any difference in this context.

Your only options are:

  1. convert the existing code to use standards mode,
  2. convert the new code to use compatibility mode, or
  3. open the HTML5 page in a completely new browser window.

Given those options, I expect you will probably give up and go with option (2) as the easy way out. Or (3) if you really need the new browser features.

But I'd encourage you to consider option (1). It is often a lot less work than you'd think to convert a site to work in newer modes. Do you know what the exact issues are that are holding it back?

Spudley
  • 166,037
  • 39
  • 233
  • 307
  • If you can have the page load in its own window (ie option 3), then the normal `X-UA-Compatible` meta tag out to help you force it into standards mode. You won't be able to do anything about it if it's in a frame, but on its own you should be able to make it work. – Spudley Sep 10 '13 at 13:08