Solved

Legacy Active Server Pages and IE10 Emulation

Posted on 2014-11-25
12
267 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 83

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 83

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 83

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 83

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 83

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
 shows up in Outlook, not OWA or on phone 3 62
WEB Farm 6 61
Element alignment and word wrapping 9 60
Recieving large files from China 4 97
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
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 the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

911 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

21 Experts available now in Live!

Get 1:1 Help Now