How do I set up my webmaker application to provide a custom HTTP response header in every page response?
I need to do this to implement this solution to IE compatibility mode being turned on by default:
http://msdn.microsoft.com/en-us/library/jj676913%28v=vs.85%29.aspx
I need to do this to implement this solution to IE compatibility mode being turned on by default:
http://msdn.microsoft.com/en-us/library/jj676913%28v=vs.85%29.aspx
RE: custom http response header?
You can intercept the WebMaker response before it is presented to the browser by using an XGate Plugin. The following link should provide more info:
http://www.hyfinity.net/mvcdocumentation_v5/javadoc/com/hyfinity/xgate/XGatePlugin.html
Regards
Abdul
RE: custom http response header?
Just to add to what Abdul has said, in general when you need to set a custom HTTP response header using an XGate plugin would be the way to do it.
However, for the +?+?++X-UA-Compatible+?+?+? header IE also allows this to be set using a meta tag inside the returned HTML instead of using an HTP Header. In this case you can set it the page skin XSL file which should be simpler than writing a Java XGate plugin. Just make sure that it gets output at the start of the +?+?++head+?+?+? tag, eg by putting it at the start of the +?+?++head_html+?+?+? template in the default skin XSL.
See http://msdn.microsoft.com/en-us/library/jj676915%28v=vs.85%29.aspx for more details on the meta tag format.
I think you might still have issues with getting the correct rendering however if the WebMaker page is being included in an iframe in a container page. I believe the behaviour was changed in IE9 so that the iframes always inherit the rendering mode of the parent regardless of their doctype etc setting.
You may find some of these links helpful if you are in this situation:
http://stackoverflow.com/questions/3717932/will-an-iframe-render-in-quirks-mode
http://www.sitepoint.com/forums/showthread.php?743000-IE9-Iframes-DOCTYPES-and-You
Microsoft produced this flow chart for IE9 to hopefully explain how the rendering modes are determined, but I am not totally sure this is exactly correct for the iframe case.
http://ie.microsoft.com/testdrive/ieblog/2010/Jun/16_IEsCompatibilityFeaturesforSiteDevelopers_1.svg
I hope this is useful.
Regards,
Gerard
RE: custom http response header?