Oracle Webcenter Spaces and Internet Explorer 9

I am working on a WebCenter Spaces application and observe some strange behavior during cross-browser testing:

When you visit a site using Internet Explorer 8, Spaces quite plausibly inserts this meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=8.0"> 

When you visit it using Internet Explorer 9, compatibility mode is enabled, but the following tag is added:

 <meta http-equiv="X-UA-Compatible" content="IE=7.0"> 

This ensures that the compatibility view is actually used. To add insult to injury, a warning dialog box appears informing the user that the compatibility view must be turned off in order to use the application.

When the compatibility view is disabled, Spaces sends a tag that does absolutely nothing in this case:

 <meta http-equiv="X-UA-Compatible" content="IE=9.0"> 

Why isn't this tag sent to IE9 in general? Will this disable compatibility mode and display the page correctly or not? How to configure WebCenter Spaces to properly support IE9?

Version Information: Currently using WebCenter 11.1.1.6, but we are going to upgrade to 11.1.1.5 (do not ask). I am testing IE9 on Windows Server 2008 R2 Standard x64.

+4
source share
1 answer

Sadly, ADF adds an X-UA-Compatible tag based on the MSIE property in the User-Agent header. As far as I know, the only way to override this behavior is to use a servlet filter. In which you can determine the version of the IE engine using the Trident property in the User-Agent and set the corresponding X-UA-Compatible tag. We have successfully used the following code for the servlet filter:

 public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest httpReq = (HttpServletRequest)request; String ua = httpReq.getHeader("User-Agent"); Pattern patternEngineIE = Pattern.compile(".*Trident/(\\d).*"); Matcher mEngineIE = patternEngineIE.matcher(ua); if (mEngineIE.find()) { int versionEngineIE = Integer.parseInt(mEngineIE.group(1)); switch (versionEngineIE) { case 4: ua = ua.replaceAll("MSIE 7.0", "MSIE 8.0"); response.addHeader("X-UA-Compatible", "IE=8"); break; case 5: ua = ua.replaceAll("MSIE 7.0", "MSIE 9.0"); response.addHeader("X-UA-Compatible", "IE=9"); break; case 6: ua = ua.replaceAll("MSIE 7.0", "MSIE 10.0"); response.addHeader("X-UA-Compatible", "IE=10"); break; } } httpReq.addHeader("User-Agent", ua); filterChain.doFilter(httpReq, response); } 

Thus, we determine the version of IE using the Trident property, which for IE8, 5 for IE9 is 4, even for compatibility mode. But in IE8 and IE9 compatibility mode, add the MSIE 7.0 property, which we will replace with MSIE 8.0 or MSIE 9.0 based on the engine version.

+2
source

All Articles