[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 313
  • Last Modified:

Legacy Active Server Pages and IE10 Emulation

QUESTION:
How does one set a classic asp web application to use Browser Mode IE10 and Document Mode “IE5 quirks” when the browser used is IE 10?
      Note:
•      The solution can not use the server HTTP Response Header setting for all applications
•      So far we have tried variations of the following:
•        <head>
o        <meta http-equiv="x-ua-compatible" content="IE=8" >

BACKGROUND:
Our government organization currently supports many business web applications. Some of these applications are built on asp.net, others on legacy classic asp pages (active server pages).  Recently the organization certified use of IE10 and continues to work on IE11 certification. In the meantime, we have been charged to begin all applications to enforce the new web standards.
I have proposed we re-write older classic applications to ASP.NET 1 at a time and modifying our ASP.Net applications using modern standards. To enforce newer standards, the organization would like to remove our current meta-tag placed on the IIS server  HTTP Response Header.
Our solution would be to control emulation at the application level. We have done this for the ASP.Net web applications by simply setting the web.config :
<configuration>
   <system.webServer>
      <httpProtocol>
         <customHeaders>
            <add name="X-UA-Compatible" value="IE=8" />
         </customHeaders>
      </httpProtocol>
   </system.webServer>
</configuration>

However, we have not yet determined how to set our web applications that run fine using the server level meta tag in the HTTP Response Header .  The response header was set to IE=8; when applications render using the server meta tag, the browser mode = 10 and the Document Mode: IE5 quirks is used.
0
Doug Kelley
Asked:
Doug Kelley
  • 7
  • 5
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
I am not an expert on your exact question... but my question to you is why does it matter?  In all the Classic ASP and PHP pages (over a 1000?) that I have written, not even One of them requires a specific browser.  What is it about your 'app' that causes that requirement?  I think that is what you should be addressing.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
Hello Dave,
It does matter! Document compatibility defines how Windows Internet Explorer renders your webpages. With the new browsers, if you are running a web application that is not up to at least 3 standards young and a meta tag is not used to "dumb down" the browser the application will brake in many locations. For example, many of the links no longer work, page objects do not line up, some pages render session variables, some java script does not function...the list goes on and on. Our testers have over 20 pages of formatting and operational issues.

The answer is to convert these applications to the newer standards. However, converting to newer standards will take time. While we are working on this, rendering in a compatible view will allow the browser to render the webpage nearly identically to the way that earlier versions Internet Explorer rendered them.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
Re-reading your question, it IS the way these applications were written that requires us to re-write them. This department required internal users to use IE only. Some of the web applications were built in the 90s! So, they used every thing MS would allow them to use regardless of current or past standards. Now, we have some work on our hands! LOL
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Dave BaldwinFixer of ProblemsCommented:
I think you understand but I'll say it just to make sure.  All of my pages work in all browsers from IE8 forward and that includes Firefox, Chrome, Safari and Opera.  The only exceptions are some HTML5 functions that IE8 does not support.  I check them with the W3C Validator and that's usually all that I have to do to make them work.

I know that a lot of pages, especially government pages for some reason, have been written to depend on specific IE functions.  But you might think about whether you still want to do that.  I don't know, maybe you actually have to.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
Oh believe me, I plan to make the over 100 applications here work cross browser platforms, but they were written specifically to use IE. So, there are literally thousands of pages of code to change, and that doesn't happen overnight.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
I would like to add to my post as we are trying to temporarily make our legacy applications (classic asp or active server pages) compatible while we pursue rewriting them.Our goal is to get the classic applications to use the document mode IE5 quirks using application level compatibility settings through a meta tag.  

The following examples illustrate the problem. The web server's meta tag in the http response header setting was included on the first picture, and removed on the second so that application level comparability was required. When the application is viewed on the server WITH a meta tag in the  response header, the page is rendered in ie5 quirks mode. However, when the meta tag is removed, browser mode IE10 and document mode Quirks is rendered. The pages do look different. See pictures below:

COAP-WithTag.png
COAP-NoTag-Content-5ResultQuirks.png
0
 
Dave BaldwinFixer of ProblemsCommented:
Have you seen these Microsoft pages on the subject?  http://msdn.microsoft.com/en-us/library/ie/hh869300%28v=vs.85%29.aspx
0
 
Dave BaldwinFixer of ProblemsCommented:
The main DCSS pages appear to be written in DotNetNuke.  Are you going to be moving to that?
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
Thanks Dave!
Yes, I did see that page, but it didn't render in IE=5 quirks mode. Before I left work today, I used java script by MS to change the DOM engine after rendering to 5. The compatibility icon showed up and the page did not render correctly. After clicking the compatibility icon it rendered correctly, but that's not the goal. However, while in the F12 screen of IE, I clicked the View, Source, DOM element page and noticed the meta tag used an ascii setting as well as some other interesting settings. I don't have access to the code right now, but I applied the meta tag setting there to the page under the <Head> tag and it rendered correctly. I'll do some more testing tomorrow and see if it really worked.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
SOLUTION
I solved the problem by providing a meta tag within an “include” file that contains HTML markup.
Code the followign into the Head tag, but before any script.
Please_wait_top.asp page:
<head>
    <meta http-equiv=X-UA-Compatible content="IE=5">
</head>
COPA_view_agreements.asp

  <head>
  <meta http-equiv=X-UA-Compatible content="IE=5">
   
  <title>
    We are here
    </title>

  </head>
Please see screen shots.
Note: Per MS
“You have to include that metadata before running scripts or rendering HTML. The mode can be switched only before you’ve done any work which uses a rendering and scripting engine, otherwise we decide based on the header or the group policy.”
http://blogs.msdn.com/b/cjacks/archive/2012/02/29/using-x-ua-compatible-to-create-durable-enterprise-web-applications.aspx
COAP-MetaTagSolution.png
COAP-MetaTagSolutionIncludeFile.png
0
 
Dave BaldwinFixer of ProblemsCommented:
That is adequately confusing.  It sounds like you are putting two <head> sections in one page.  If you are, that is not a valid HTML page and will cause some problems in browsers.
0
 
Doug KelleySenior Programmer AnalystAuthor Commented:
Did not get an answer that worked until I tried to include the meta tag into include files. We will be testing the outcome of this theory through many applications and add anything discovered that helps. Thanks.
Doug Kelley
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 7
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now