Solved

Legacy Active Server Pages and IE10 Emulation

Posted on 2014-11-25
12
217 Views
Last Modified: 2014-12-01
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
Comment
Question by:Doug Kelley
  • 7
  • 5
12 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40465850
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
 

Author Comment

by:Doug Kelley
ID: 40465918
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
 

Author Comment

by:Doug Kelley
ID: 40465923
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40465933
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
 

Author Comment

by:Doug Kelley
ID: 40465947
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
 

Author Comment

by:Doug Kelley
ID: 40465960
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40465983
Have you seen these Microsoft pages on the subject?  http://msdn.microsoft.com/en-us/library/ie/hh869300%28v=vs.85%29.aspx
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40465985
The main DCSS pages appear to be written in DotNetNuke.  Are you going to be moving to that?
0
 

Author Comment

by:Doug Kelley
ID: 40466025
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
 

Accepted Solution

by:
Doug Kelley earned 0 total points
ID: 40467857
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
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40468074
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
 

Author Closing Comment

by:Doug Kelley
ID: 40473337
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now