This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
we have a complex web application, running on ibm websphere application server 8. The main page for the user has a x-ua-compatible meta tag in the <head> : <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8">
No matter what we tried, there is no way to find where this tag is actually set. It's hard coded somewhere very deep.
However we have full access to some of the jsp pages, that build the content below this meta tag. We have implemented some HTML 5 and CSS 3 functionality in the application and we need to make the page automatically switch to IE=edge when loaded, so that the new functions can be used when the user has IE 10.
We tried a lot of things - set another meta tag in the head area, set meta tag in a previous page, create a custom html response header for x-ua-compatible for every page, try to override the tag using client scripts, etc. but the mentioned meta tag takes precedence over everything we tried and everytime the page is loaded - the browser switches to IE=9 standards.
My question is:
Is there a way to add code in one of the jsp pages that is included in the build up of the main page, so that this code finds the meta tag in the parent page and overwrites it with IE=edge, before it is served to the client browser? If so can you aid me in this matter?
Or is there another way to do this?
We are struggling with this issue and I would very much appreciate the help.
In my opinion, your time is better spent finding out how the pages are constructed so that you can fix this without band-aids (which almost always have undesirable side effects). After all, this isn't likely the last change you might have to make to the header as time goes on.
I absolutely agree and that's what we've been trying for the past 1-2 weeks, but as this is an IBM application, it's always very complicated. There are quite a few applications deployed in WebSphere Application Server that keep passing the ball around when the page is being constructed. Also a lot of dojos in there in different colors too (blue dojo, regular gojo. etc.) . There are parts of the page, that cannot be found as text in any file on the system, so I am searching for an alternative method as all our attempts to find this one line of code are failing so far.
Our efforts continue but meanwhile I hope someone could answer the above question, so we could try this also.