-2

I developed a java web app, it looks different in depends if I run it from localhost (tomcat6 and windows) or from the server (tomcat6 with linux). The best result are with chrome or firefox, where the page at localhost is the same of the webpage deployed on the server. Seems like when using IE11 on the remote server, the css are missing (IE11 on localhost is fine, it has rounded corner and shadow under the bar).

this 3 images are taken all from my machine that run on Windows 7:

I load this jsp to create the bar in the image:

<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
    <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' />
    <link rel='stylesheet' type='text/css' href='${pageContext.request.contextPath}/css/styles.css' />
</head>

<body>
<br>
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width: 90%;">
    <tr>
        <td width="18%">
            <div id='cssmenu' >
                <s:url action="logout.action" var="Esci" />
                <s:url action="inserisciRichiestaLDAP" method="back" var="menuAdmin" />
                <ul>
                   <li class='active'><s:a href="%{menuAdmin}"><span>Lista richieste</span></s:a></li>
                   <li class='last'><s:a href="%{Esci}"><span>Esci</span></s:a></li>
                </ul>
            </div>              
        </td>
    </tr>
</table>
</body>
</html>

Why do all works fine except in IE11?

1 Answer 1

1

Based on the images you've provided, it looks like your IE11 deployed version is rendering in compatibility view. (Something you can verify using the IE11 F12 developer tools.)

That's the underlying problem. The open question is what's forcing that? Hard to say given the available information.

First, make sure all outstanding updates have been applied, as certain updates add functionality to IE11. [1]

Your page contains an x-ua-compatible meta element and it seems to be correctly specified, so my hunch is that something is forcing the remote server to be interpreted differently. EMIE, perhaps? Group policy? Perhaps the remote server's URL is mapped to a security zone other than the Internet zone? Gremlins? Hard to say based on available data.

You might be able to get a hint from the F12 tools console window. [2] Failing that, you might be able to use Fiddler to capture a trace of the HTTP negotiation. Perhaps there's another header involved.

Hope this helps...

References:

[1] - http://msdn.microsoft.com/en-us/library/ie/dn798774(v=vs.85).aspx

[2] - http://msdn.microsoft.com/en-us/library/ie/dn423949(v=vs.85).aspx

3
  • I follow your suggest, you've right, using F12 I discovered that my page is showing in IE5 compatibility, when I switch to "edge" it looks fine. Maybe I've to add the tag X-UA-Compatible to the page that contains the jsp that I showed upside. I doesn't think that can be a browser lack of update, because with the same browser the page at localhost is fine. But you talked about security zone, yes, the IP of the remote server is under a security zone covered by an authentication proxy. Oct 15, 2014 at 10:00
  • As I recall, x-ua-compatible in the page is supposed to overrule all other declarations. Having said that, some edge case parsing rules were never documented. Try viewing the source of the page once it's been delivered from the server. IIRC, <!DOCTYPE> must be the first line in the page, otherwise, it's ignored. I would also investigate other avenues, like registry hacks, group policies, and others. You need to discover why the server is serving HTML5 quirks mode. Also, trying adding a mark of the web to force the page into Internet zone. Might help. Might not. Oct 16, 2014 at 18:16
  • You've right, the tag <meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1' /> was in all the page with compatibility problem, but the problem was that all this page, were inside other page that haven't the tag. So the tag wasn't at the beginning of html. Oct 21, 2014 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.