-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm developing an application on zk5.0.10 to be accessed from IE8 browsers. The application's address is configured as an intranet local site, and sites in the intranet are configured (this is necessary in order to guarantee legacy applications get displayed correctly) to be displayed in the compatibility mode.
I've tried to enforce the IE8 mode by applying a filter that establishes an X-UA-Compatible http header as IE=8. This way, when I load my zul page, I open the developer tools and see <body class="ie ie8" onbeforeunload="">; org.zkoss.zk.ui.util.Clients.evalJavaScript( "alert(document.documentMode);" ); also yields 8.
My zul does not get correctly rendered, however. Here's the difference:
It should be displayed like this:
Any suggestion?
Hi,
I think you would need to detect the mode of the browser making the request at server side and generate the page accordingly. Whether this is actually possible or not, I'm afraid I cannot tell.
With kind regards
César Varona
Hello everyone,
here is a hack, that nails down zk to a fixed browser version. Add a listener that implements WebAppInit with:
@Override
public void init(WebApp wapp) throws Exception {
Servlets.setClientIdentifier(new ClientIdentifier() {
@Override
public ClientIdentifier matches(String userAgent) {
return this;
}
@Override
public double getVersion() {
return 10;
}
@Override
public String getName() {
return "ie";
}
});
}
Best would be to detect the IE version in the client, send that information to the server and keep this in the session / wherever it makes sense. By default, ZK uses the http header string, which does not work correctly for the given case.
Asked: 2012-02-14 16:46:12 +0800
Seen: 504 times
Last updated: Sep 23 '13