www.webdeveloper.com
Results 1 to 7 of 7

Thread: how to override IE's compatability mode

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bundanoon: first village to ban bottled water
    Posts
    221

    how to override IE's compatability mode

    Hi,

    I am trying to override IE's compatability mode.
    I'm testing locally in IE10, and have made sure IE isn't caching previous tests.

    <meta http-equiv=“X-UA-Compatible” content=“IE=edge” />
    is in the head and before any css link.


    If compatability mode is set to "off", the display is correct;

    if it's set to "on", it overrides
    <meta http-equiv=“X-UA-Compatible” content=“IE=edge” />.

    Any suggestions?

  2. #2
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    881
    Could you post a bit more of your code? It's hard to tell exactly what's going on in your case, but I will note that the X-UA-Compatible meta tag has to be the first meta tag in the <head> element. There are some other things that could affect it, but again without seeing more of the code it's hard to tell what's messing it up in your case.
    "Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"

  3. #3
    Join Date
    Nov 2005
    Location
    Bundanoon: first village to ban bottled water
    Posts
    221
    Code:
    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>易 The Changes</title>
    <meta http-equiv=“X-UA-Compatible” content=“IE=edge” />
    <meta name="description" content="generate a hexagram or two" />
    <link rel="icon" href="img/changes.ico" type="image/x-icon"> 
    <link rel="shortcut icon" href="img/changes.ico" type="image/x-icon">
    <meta name="author" content="ctoz" />
    <style type="text/css">html {background:#babdbf url(img/g4cmyk.png) fixed left 75% repeat-x; overflow:hidden;}</style>
    <link rel="stylesheet" type="text/css" href="css/changes.css">
    <script type="text/javascript">
    // css for a variable-width text column: IE and Opera don't accept this formulation
    if (screen.height /= screen.width > 1.34) {document.write('<link rel="stylesheet" href="css/changes_wide.css">')};
    </script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.8.11/jquery-ui.js"></script>
    <script type="text/javascript" src="js/css_browser_selector.js"></script>
    <!-- for forum post: the above script isn't applied yet, not doing anything -->
    <script type="text/javascript" src="js/changes.js"></script>
    <script type="text/javascript" src="js/time.js"></script>
    <script type="text/javascript" src="js/dw_event.js"></script>
    <script type="text/javascript" src="js/dw_scroll.js"></script>
    <script type="text/javascript" src="js/scroll_controls.js"></script>
    <script type="text/javascript">
    function init_dw_Scroll() {var wndo = new dw_scrollObj('wn', 'loadIt'); wndo.setUpScrollControls('scrollLinks');}  if ( dw_scrollObj.isSupported() ) {dw_Event.add( window, 'load', init_dw_Scroll);}
    </script>
    </head>
    Last edited by jedaisoul; 03-13-2014 at 05:26 AM. Reason: code tags added

  4. #4
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    881
    Please try to use the HTML, PHP or CODE bbcode when posting code, it makes your post a lot nicer

    So it seems your charset meta tag is being set first, which is most likely the reason the compatibility mode override is not working for you. Try
    HTML Code:
    <!doctype html>
    <html>
    <head>
    <meta http-equiv=“X-UA-Compatible” content=“IE=edge” />
    <meta charset="UTF-8">
    <title>易 The Changes</title>
    <meta name="description" content="generate a hexagram or two" />
    <link rel="icon" href="img/changes.ico" type="image/x-icon">
    <link rel="shortcut icon" href="img/changes.ico" type="image/x-icon">
    <meta name="author" content="ctoz" />
    <style type="text/css">html {background:#babdbf url(img/g4cmyk.png) fixed left 75% repeat-x; overflow:hidden;}</style>
    <link rel="stylesheet" type="text/css" href="css/changes.css">
    <script type="text/javascript">
    // css for a variable-width text column: IE and Opera don't accept this formulation
    if (screen.height /= screen.width > 1.34) {document.write('<link rel="stylesheet" href="css/changes_wide.css">')};
    </script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.8.11/jquery-ui.js"></script>
    <script type="text/javascript" src="js/css_browser_selector.js"></script>
    <!-- for forum post: the above script isn't applied yet, not doing anything -->
    <script type="text/javascript" src="js/changes.js"></script>
    <script type="text/javascript" src="js/time.js"></script>
    <script type="text/javascript" src="js/dw_event.js"></script>
    <script type="text/javascript" src="js/dw_scroll.js"></script>
    <script type="text/javascript" src="js/scroll_controls.js"></script>
    <script type="text/javascript">
    function init_dw_Scroll() {var wndo = new dw_scrollObj('wn', 'loadIt'); wndo.setUpScrollControls('scrollLinks');} if ( dw_scrollObj.isSupported() ) {dw_Event.add( window, 'load', init_dw_Scroll);}
    </script>
    </head> 
    "Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"

  5. #5
    Join Date
    Nov 2005
    Location
    Bundanoon: first village to ban bottled water
    Posts
    221
    Nope... putting the override as the first meta tag didn't help.

    It may just possibly have something to do with being on an office intranet.
    I'll check the css and js and put the page online.
    But I can't ftp to external sites from here, so stay tuned, back in 24 hrs...

    The actual rendering problem is on some links and not on others.
    a[href="#"]:link {style}
    defaults to blue and purple;
    a[href="javascript:/ * */"]:link {style}
    and
    a[href="http://"]:link {style}
    render correct.

  6. #6
    Join Date
    Nov 2005
    Location
    Bundanoon: first village to ban bottled water
    Posts
    221
    I'm putting a test together, but am almost sure now it's an intranet problem: see this post.

  7. #7
    Join Date
    Nov 2005
    Location
    Bundanoon: first village to ban bottled water
    Posts
    221
    So here are the tests: I'm flying blind at home on a mac.

    The first test should work: curious about whether the second has any effect—
    www.wavehands.net/test1.htm
    www.wavehands.net/test2.htm

    If anyone's on an intranet with compatability mode on, I'd be interested in the results... I won't be back at my IE workplace till monday.

    cheers.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles