Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3274142
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:00:23+00:00 2026-05-17T19:00:23+00:00

Consider the following Html file: <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd> <html> <head>

  • 0

Consider the following Html file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>test</title>
        <style type="text/css">

        </style>
    </head>
    <body>
        <script type="text/javascript">
            alert('' +
                '\'test\'[0] = \'' + 'test'[0] + '\'\n' +
                '\'test\'.charAt(0) = \'' + 'test'.charAt(0) + '\'\n'
            );
        </script>
    </body>
</html>

When I open this file on my local machine it gives the following output (both in ie8 and Chrome):

'test'[0] = 't'
'test'.charAt(0) = 't'

When I host this file on IIS7.5 I still get the same result in Chrome but ie8 gives the following result:

'test'[0] = 'undefined'
'test'.charAt(0) = 't'

How is this possible?

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:00:23+00:00Added an answer on May 17, 2026 at 7:00 pm

    OK I found out it was due to compatibility view. Internet explorer comes standard (I think, I am not the owner of this laptop) with the option to display all intranet pages in compatibility View. To force it to use ie8 compatibility view I had to add the following meta tag to the head element:

    <meta http-equiv="X-UA-Compatible" content="IE=edge" > <!-- IE8 mode -->
    

    You can also turn this option off under ‘Page’ > ‘Compatibility View Settings’

    This question has put me in the right direction.

    EDIT: I advise web developers to leave this option checked in ie8, because most of your users will have it checked. This way you will catch these errors in the development cycle.

    EDIT2: sv_in is right. IE=edge is much cleaner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the following code: index.html <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd> <html> <head>
Consider the following html snippet <!DOCTYPE html> <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.4.2.js ></script> <script
Consider the following html http://www.carbide-red.com/prog/test_table.html I have worked out that I can move left
I was following the guide here: http://www.sqlalchemy.org/docs/orm/examples.html?highlight=versioning#versioned-objects and have come across an issue. I
Consider the following html document: <!DOCTYPE html> <html> <head> <script type=text/javascript> alert(Hello) </script> </head>
Consider test.cfm file with the following content: <html> <body> <cfif foo EQ bar> <cfset
Consider the following HTML: (Written for Google Chrome) <html> <head> <script language=javascript> function AddToIFrame(){
Consider the following HTML: <div id=myfavorites> <p><button id=saveFav>Save my favorites</button> </p> <p><a href=http://bit.ly/fzgxya>http://bit.ly/fzgxya</a> <a
I stumbled across some bizarre behavior in Firefox 12. Consider the following HTML: <!DOCTYPE
Consider the following code: <!DOCTYPE html> <html> <body> <script type=text/javascript> var str = '<12>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.