IE compatibility mode


  • Discourse touched me in a no-no place

    I have a web page that has an iframe like this:

    <iframe id="name" width="800" height="600" seamless></iframe>

    I use a body onload handler to set the src of the iframe. Because the people who wrote the application this iframe is in are still living in the early 2000s the application overall requires compatibility mode in IE. With CM turned on, the iframe doesn't render. Does anyone know of any way to make this work?


  • SockDev

    remove the seamless declaration?

    that might work?

    or does it work if you put the src in manually instead of jsing it?

    what about creating the entire iframe node via JS?

    it's been a while since i played with CM in IE but those would be the sort of things i'd try first



  • Is there meta tag in the head of the embedded document specifying the IE rendering mode?



  • You would think the IFrame would work great in compatibility mode, since it's old school "web design"


  • Discourse touched me in a no-no place

    @jaming said:

    Is there meta tag in the head of the embedded document specifying the IE rendering mode?

    I'm not sure, but I can check. It's a standalone application, though, so I wouldn't be able to add one if it wasn't there.



  • @FrostCat said:

    @jaming said:
    Is there meta tag in the head of the embedded document specifying the IE rendering mode?

    I'm not sure, but I can check. It's a standalone application, though, so I wouldn't be able to add one if it wasn't there.

    Do you control the server? You can send it as an HTTP header - that's the recommended way to do it by MS, anyway. The meta tag can cause a hard stop on the rendering engine, slowing page load times.



  • Wait, he said he needs it to run in compatibility mode because it's fifteen year old markup. Sending a header to disable CM might make the iframe work, but it wouldn't meet his requirements.



  • @Jaime said:

    Wait, he said he needs it to run in compatibility mode because it's fifteen year old markup. Sending a header to disable CM might make the iframe work, but it wouldn't meet his requirements.

    Huh? I'm saying, if he controls the server to send X-UA-Compatible in the HTTP headers to set the proper compatibility mode.



  • @FrostCat said:

    I have a web page that has an iframe like this:

    <iframe id="name" width="800" height="600" seamless></iframe>

    I use a body onload handler to set the src of the iframe. Because the people who wrote the application this iframe is in are still living in the early 2000s the application overall requires compatibility mode in IE. With CM turned on, the iframe doesn't render. Does anyone know of any way to make this work?

    Have you checked all the plumbing to make sure the request and response are being made (e.g. fiddler)? Usually I find that I'm getting OPTION'd or CSP'd.



  • @rad131304 said:

    Huh? I'm saying, if he controls the server to send X-UA-Compatible in the HTTP headers to set the proper compatibility mode.

    But, he's already in compatibility mode. The stated problem was to get the iframe to display in the mode he's forced to work in, not to change the mode. Any suggested solution that affects the mode doesn't answer the question that was asked.



  • @Jaime said:

    But, he's already in compatibility mode. The stated problem was to get the iframe to display in the mode he's forced to work in, not to change the mode. Any suggested solution that affects the mode doesn't answer the question that was asked.

    jaming said:

    @jaming said:

    Is there meta tag in the head of the embedded document specifying the IE rendering mode?

    FrostCat said:

    @FrostCat said:

    I'm not sure, but I can check. It's a standalone application, though, so I wouldn't be able to add one if it wasn't there.

    I said:

    @rad131304 said:

    Do you control the server? You can send it as an HTTP header - that's the recommended way to do it by MS, anyway. The meta tag can cause a hard stop on the rendering engine, slowing page load times.

    Where, in any of that, are we actually talking about the specific iframe issue in the OP? They're talking about if/how the IE rendering mode is set by the application and how it can be changed.

    Incidentally, found this on SO regarding how IE9 determines document mode, but the original image seems to be gone, so it may not be correct for newer versions of IE:



  • @rad131304 said:

    Where, in any of that, are we actually talking about the specific iframe issue in the OP?

    @FrostCat said:

    Because the people who wrote the application this iframe is in are still living in the early 2000s the application overall requires compatibility mode in IE. With CM turned on, the iframe doesn't render.

    He obviously got CM turned on, or the second statement in the quote wouldn't make any sense.



  • @FrostCat said:

    I'm not sure, but I can check. It's a standalone application, though, so I wouldn't be able to add one if it wasn't there.

    It doesn't matter anyway.

    As of IE9 a webpage can only render in one document mode, determined by the top level page. Child document contexts, which includes iframes, are forced to run in the same document mode as the parent webpage.

    As of IE10 the situation probably got worse: there is an emulated 'HTML5 Quirks mode' present that can be used to mix-and-match standards mode and legacy content spread across frames. However, this mode bunches together all non-HTML5 legacy document types, which includes the HTML 4.0 and XHTML 1.x ones, with documents without document types and apparantly treats them all as to be rendered with IE5-level quirks mode.


  • I survived the hour long Uno hand

    @rad131304 said:

    Where, in any of that, are we actually talking about the specific iframe issue in the OP?

    This is coding help, we're supposed to stay on topic, at least until the problem is solved.


  • Discourse touched me in a no-no place

    @rad131304 said:

    Have you checked all the plumbing to make sure the request and response are being made (e.g. fiddler)?

    Not as such. With CM off, everything works. With CM on, the iframe and it's contents don't render--I get a blank page. I don't know enough to know what the problem specifically is--front-end web dev is not my primary job function.

    The outer application, which currently requires CM, is being updated so that "IE6 only" is no longer a hard requirement, but because it's a big task and there's limited development resources, it'll probably take like a year, so if I can get this one bit of functionality to work regardless of CM it's helpful. (Because the alternatives are telling our users "turn CM on and off as necessary" or "use IE for application X and Chrome for application Y[1]". I'm going to try @accalia's suggestions first since they're the simplest/most straightforward. I control the external application's server, but nothing about it--it's a WAR that, for the purposes of this discussion, is a black box.

    [1] We have two interrelated but separate web applications; the much larger one requires CM and will for an indefinite period. I think we're talking another year or so; they're in the process of rolling out "works in other browsers and modern IE" in stages. The 3rd-party app I've integrated is in the much smaller app that's already gone through that and so actually works with or without CM, and in non-IE browsers...except my bit under discussion doesn't work with CM.


  • Discourse touched me in a no-no place

    @Jaime said:

    He obviously got CM turned on, or the second statement in the quote wouldn't make any sense.

    In the dev environment, the application's running on a intranet server, so CM is on by default. In production, it's not, so we tell users how to turn on CM for the site. (I wasn't aware of this nuance during development, and I knew the 3rd-party app didn't work with CM on, so I either turned it off or used Chrome. I was just told that I need to try to get it working under CM.)



  • @FrostCat said:

    @rad131304 said:
    Have you checked all the plumbing to make sure the request and response are being made (e.g. fiddler)?

    Not as such. With CM off, everything works. With CM on, the iframe and it's contents don't render--I get a blank page. I don't know enough to know what the problem specifically is--front-end web dev is not my primary job function.

    Ok, so it's probably not an XFO or CSP problem then.

    My bet, unfortunately, is that the app in the iframe is relying on some js functionality that didn't exist in IE6 and the app has no polyfill for it. There's really not much you can do about it if that's the case unless you can find/add the required shim. I'm assuming there are no errors in the console? Can you go to the app outside of the iframe and see if it renders in CM?

    @FrostCat said:

    The outer application, which currently requires CM, is being updated so that "IE6 only" is no longer a hard requirement, but because it's a big task and there's limited development resources, it'll probably take like a year, so if I can get this one bit of functionality to work regardless of CM it's helpful. (Because the alternatives are telling our users "turn CM on and off as necessary" or "use IE for application X and Chrome for application Y[1]". I'm going to try @accalia's suggestions first since they're the simplest/most straightforward. I control the external application's server, but nothing about it--it's a WAR that, for the purposes of this discussion, is a black box.

    [1] We have two interrelated but separate web applications; the much larger one requires CM and will for an indefinite period. I think we're talking another year or so; they're in the process of rolling out "works in other browsers and modern IE" in stages. The 3rd-party app I've integrated is in the much smaller app that's already gone through that and so actually works with or without CM, and in non-IE browsers...except my bit under discussion doesn't work with CM.

    OK cool, if you want, you can stop telling people how to turn on compatibility mode and add the X-UA-Compatible header to the HTTP headers sent in the response. I don't know how, specifically, to do it on what I'm guessing is Tomcat, but it should be fairly strait-forward.

    Also, I agree, try @accalia's suggestions - they were good ones.



  • @Yamikuronue said:

    @rad131304 said:
    Where, in any of that, are we actually talking about the specific iframe issue in the OP?

    This is coding help, we're supposed to stay on topic, at least until the problem is solved.

    I was on topic. Learn to read.



  • @rad131304 said:

    OK cool, if you want, you can stop telling people how to turn on compatibility mode and add the X-UA-Compatible header to the HTTP headers sent in the response.

    @FrostCat said:

    the people who wrote the application this iframe is in are still living in the early 2000s the application overall requires compatibility mode in IE.

    Once again, you have fixed @FrostCat's iframe problem, but have broken the rest of the site. If the application requires compatibility mode (and it does according to the OP), then you cannot turn off compatibility mode and call it a solution.



  • Well, no, it actually does the exact opposite, but nice try?



  • Uhh... the browser support for that attribute doesn't exactly look good:

    Maybe since you're already using Javascript, grab the frame with AJAX and put it in a <div> element?


  • Discourse touched me in a no-no place

    @anotherusername said:

    Uhh... the browser support for that attribute doesn't exactly look good:

    Oh, good grief. Where'd you get that table, w3schools or somewhere else? I guess at the least I'll take the attribute off the tag.

    As it turns out they expect to have removed the need for compatibility mode for the other application in the next few months or sooner so it looks like I won't have to find a workaround after all.



  • for future reference, a great place to find out browser support:



  • @FrostCat said:

    Where'd you get that table, w3schools or somewhere else?

    Looks like it is W3Schools, and they aren't the only ones who say it isn't supported across the board:

    http://caniuse.com/#search=seamless (and I was :hanzo:'d)


  • Discourse touched me in a no-no place

    @ChaosTheEternal said:

    they aren't the only ones who say it isn't supported across the board:

    Oh, my question wasn't intended to be snarky, I was just wondering where the picture was from. I don't remember seeing that the thing wasn't supported when I was looking for it. Should've known better.



  • I usually check that stuff on Mozilla, which agrees:



  • @FrostCat said:

    my question wasn't intended to be snark

    I didn't take it that way, I just don't take anything from W3Schools at face value without extra confirmation. I also don't tend to use W3Schools as a reference due to its history and that I don't think it covers things as well as other sources.



  • Rewrite everything using that with div tag instead.

    I know it's troublesome, painful and timeconsuming, I'd done it a few times. If the requirement requires you to not use HTML5 or certain cool technologies, you should not use them.



  • CanIUse site also provides good checkup for most HTML features.



  • @ChaosTheEternal said:

    due to its history

    Pray tell, what history? Care to elaborate? W3Schools is how I taught myself html5/javascript/css/etc.

    *Hides under table to avoid thrown objects*

    Hey give me a break! It was the summer of my freshman year of college, and I had a Web Development "internship" to basically rewrite turbotax from scratch. Mind you I was the Lead Developer (of TWO people total, neither with any experience) because the other guy couldn't understand that the client has no idea what a "foreign key" relationship is.



  • @mrguyorama said:

    Pray tell, what history? Care to elaborate?

    Someone else may be able to shed better light than myself, but for awhile, they were far behind on HTML5 and CSS3 information as well as being wrong on some of the other HTML/JS/CSS/Misc items they covered without accepting updated information to make things more accurate.

    W3Fools used to have a long list of what was wrong with W3Schools, but since have removed it to be "positive" and to highlight that W3Schools has actually made improvements. Here's where I originally found out about the W3Fools site (on the old TDWTF forums).



  • Wow okay, 2008. Well, hopefully when I learned in like 2012 they were accurate. Either way, I don't think anything I wrote ended up in production and if it did, I tried very hard to keep up best practices, having been a TDWTF reader since about 2007 :thumbsup:


  • Discourse touched me in a no-no place

    W3Schools is very barebones in what it has; I usually use it as a lookup of first choice if I want to check syntax or something basic, and then if I need more information I move on.


  • SockDev

    @ChaosTheEternal said:

    but since have removed it to be "positive" and to highlight that W3Schools has actually made improvements

    While i aprove of that move, the curious might chafe at the removal.

    the wayback machine still has those old entries if you want to go looking through them.



  • @accalia said:

    the curious might chafe at the removal

    Here's one key thing that has been removed from that site that is still a thing on W3Schools (and still questionable):

    W3Schools offers certifications whose value is highly debatable… No employers recognize or respect W3Schools certificates. Unlike Microsoft’s MCP or Cisco’s CCC, W3Schools has absolutely no authority over the technologies for which they claim to provide certification. Unlike CompTIA’s ANSI/ISO accredited certifications, W3Schools has no support from governing standards bodies.

    Yes, people don't have to get the certifications, but the fact they're offering them with no real backing is what is objectionable.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.