// first option uses compatibility mode, second option too but stronger // X-UA-Compatible: IE=7 // X-UA-Compatible: IE=EmulateIE7 if (context.getUserAgent().isIE(8, 8)) { var exCon = facesContext.getExternalContext(); var response = exCon.getResponse(); response.setHeader("X-UA-Compatible", "IE=EmulateIE7"); }
var exCon = facesContext.getExternalContext(); var response = exCon.getResponse(); response.setHeader("X-UA-Compatible", "IE=8");
var uAgent = context.getUserAgent().getUserAgent(); if (uAgent.match('iPhone') != null){ context.redirectToPage('/iPhone.xsp'); }
<resource rendered="#{javascript:context.getUserAgent().getUserAgent().match('iPhone')}"> <content-type>text/css</content-type> <href>iPhone.css</href> </resource>
dojo.isIE dojo.isMozilla dojo.isFF dojo.isOpera dojo.isSafari dojo.isKhtml
Hi, thank you for this info.
I have used this code in my xpage and it's working fine, so now I can see it in IE 7 and 8, but I'm having issues with Firefox 3.5. Is there a similar solution for Firefox 3.5? Thank you!
the solution is to use Domino 8.5.1. :-)
In the theme code** match("iPhone") should read match('iPhone')
fixed, thanks!
What about the opposite?
I have an XPages based site using 8.5.2 and the Extension Library. It seems to work much better not in IE 7 Compatability mode of IE 8, but users still using Compatability mode from before the Domino server upgrade and Extension Library added.
I really need to force IE 8 to not use Compatability Mode for this application.
Any ideas?
Thank you for the info on this page! Saved my butt!
I use this to force IE users to use edge-mode if it's available which prevents someone from putting your site into compatibility mode.
// X-UA-Compatible: IE=edge (will be highest possible renderer for that version)
var ua = context.getUserAgent();
var versionNbr = ua.getBrowserVersionNumber();
if (ua.isIE() && versionNbr >= 8.0) {
var exCon = facesContext.getExternalContext();
var response = exCon.getResponse();
response.setHeader("X-UA-Compatible", "IE=edge");
};
Is there anything out there to force ie9 to act like ie7? IE9 doesn't play well with Xpage functions.