<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="http://devedge.netscape.com/lib/xsl/devedge-1.00/article_ja.xsl"?>
<nde:article 
  url="http://devedge.netscape.com/viewsource/2002/gecko-compatibility/"
  xmlns:nde="http://devedge.netscape.com/2002/de"
  xmlns:ent="http://devedge.netscape.com/2003/ent"
  xml:lang="ja">
  <nde:header>
  <nde:title>Netscape Gecko Compatibility Handbook</nde:title>

  <nde:category>テックノーツ</nde:category>
  <nde:email href="http://devedge.netscape.com/community/feedback/">Feedback</nde:email>
  <nde:pubdate year="2002" month="08" day="16"/>
  <nde:summary>How to diagnose and avoid common web site problems with 
        Netscape, AOL for Mac OS X and other browsers based 
        on the Netscape Gecko embeddable browser
  </nde:summary>
  <nde:channels>
    <nde:channel id="viewsource"/>
    <nde:channel id="gecko"/>
  </nde:channels>

</nde:header>

  <nde:head>
    <style type="text/css">
#id1 { text-decoration: line-through; }
#ID1 { text-decoration: underline; }
.class1 { font-size: 1em; }
.CLASS1 { font-size: 2em; }

    </style>
  </nde:head>

  <nde:abstract>How to diagnose and avoid common web site problems with 
        Netscape, AOL for Mac OS X and other browsers based 
        on the Netscape Gecko embeddable browser
  </nde:abstract>

  <nde:content>
    <h2>
      <a name="contents">Contents</a>
    </h2>

    <ul>
      <li>
        <a href="#intro">Introduction</a>
      </li>

      <li>
        <a href="#testing">Verifying Compatibility With Netscape Gecko
      Browsers</a> (AOL for Mac OSX, CompuServe 7, Netscape 6/7 etc.)
      </li>
	<ul>
	<li>
	Evaluating Your Site 
	</li>
	<li>
	Testing From Within a Firewall
	</li>
	<li>
	Preparing Customer Support Information
	</li>
	</ul>
      <li>
        <a href="#diagnose">Quick Reference: Web Site
        Problems/Solutions</a>
      </li>

      <li>
        <a href="#xbrowser">In-depth: Problems Due to Existing
        Coding Techniques</a>

        <ul>
          <li>
          <a href="#xbrowser-markup">Using browser-specific
          proprietary HTML markup</a>

          (such as LAYERS)</li>

          <li>
            <a href="#xbrowser-sniffing">Using browser detection or
            sniffing</a>
          </li>

          <li>
            <a href="#xbrowser-bugs">Coding workarounds for well
            known bugs</a>
          </li>

          <li>
            <a href="#xbrowser-tools">Using obsolete APIs or Web
            Authoring tools</a>
          </li>
        </ul>
      </li>

      <li>
        <a href="#doctype">Inappropriate DOCTYPE specifications</a>
      </li>

      <li>
        <a href="#plugins">Problems related to plugins</a>
      </li>

      <li>
        <a href="#servers">Problems due to web servers</a>

        <ul>
          <li>
            <a href="#servers-mime">Incorrectly specified MIME
            types</a>
          </li>

          <li>
            <a href="#servers-http">Faulty implementations of
            HTTP</a>
          </li>

          <li>
            <a href="#servers-ssl">Faulty implementations of
            SSL</a>
          </li>
        </ul>
      </li>

      <li>
        <a href="#tools">Diagnostic Tools</a>
      </li>

      <li>
        <a href="#reporting">Problem Reporting</a>
      </li>

      <li>
        <a href="#references">References</a>
      </li>
    </ul>

    <br />

    <br />

    <h2>
      <a name="intro">Introduction</a>
    </h2>
    <p>
    The goal of this handbook is to help you create and 
update websites that work with standards-based browsers 
and properly detect Netscape Gecko. Netscape Gecko is the name 
of the browser engine embedded in 
Netscape 6 and 7 (in beta), Mozilla, AOL for Mac OS X, 
CompuServe 7, a Windows version of AOL (in beta), as well as other browsers. The 
    <a href="http://devedge.netscape.com/">Netscape DevEdge</a>
    site has resources to help you learn more about compatibility with 
    methods prescribed by the World Wide Web Consortium.</p>
    <p>Why the need for a handbook? Here's a little background. 
    Since 1997, much of the Web's content has been developed for 
    Microsoft Internet Explorer 4 or Netscape Navigator 4. These 
    browsers were developed before the relevant W3 Standards for 
    <a href="http://devedge.netscape.com/central/html/">HTML</a>, 
    <a href="http://devedge.netscape.com/central/css/">CSS</a>

    and the 
    <a href="http://devedge.netscape.com/central/dom/">DOM</a>

    were created. </p>

<p>On the other hand, Netscape Gecko was designed from the ground up
to support <a href="http://www.w3.org/">W3 Standards</a> rather 
than the proprietary approaches of the past.
The ultimate goal of standards is to simplify web 
development in the long run. However in the short term, 
the result is that pages coded using non-standard, 
proprietary techniques may not display as intended in 
Netscape Gecko-based browsers. </p>

<p>Key differences between earlier, non-standards based browsers 
and Netscape Gecko inclunde:
</p>

    <p>

    <ol>
      <li>These browsers use proprietary (non-standard) HTML, CSS
      and JavaScript.</li>

      <li>Internet Explorer 4 and Netscape Navigator 4 share
      support for a large part of the HTML 3.2 standard and basic
      JavaScript.</li>

      <li>While they support the CSS 1 standard to some degree, the
      implementations are not complete and are non-standard.</li>

      <li>Neither Internet Explorer 4 or Netscape Navigator 4
      support the W3 DOM. Instead, each browser supports its own
      proprietary API for manipulating the content, style and
      position of HTML Elements in a web page.</li>

      <li>In addition, Internet Explorer 4 and Netscape Navigator 4
      use completely different methods of embedding.
      third-party software into the browser.</li>
    </ol>

   </p>
   <p>
    As discussed in Mozilla.org's 
    <a href="http://www.mozilla.org/docs/web-developer/upgrade_2.html" 
    target="_top">Using Web Standards in Your Web Pages</a>, cross-browser 
    coding for cross-browser compatibility requires you write standard 
    markup that Netscape Gecko-based browsers, Netscape 4, and IE 
    browsers can render properly.
   </p>
    <hr />

    <h2>
      <a name="testing">Testing Your Site with Netscape Gecko
      Browsers (AOL for Mac OSX, CompuServe 7, Netscape 6/7 etc.)</a>
    </h2>

    <p>Netscape Gecko is a cross-platform browser engine, compatible with  
    a number of Windows versions including Windows XP, as well as 
    Mac and Linux. Because of Netscape Gecko's cross-platform
    nature, functionality is generally very much
    the same on different platforms unlike IE for Mac and IE for
    Windows, which are very different programs and so may behave
    quite differently from each other.</p>
<p>
Mozilla.org's 
<a href="http://www.mozilla.org/docs/web-developer/upgrade_2.html" target="_top">Using Web Standards in Your Web Pages</a> is a great introduction to tags and techiques supported by Gecko-based browsers.
</p>
 <p>However, even if your site works on Netscape 6, it's 
important to test your site in <a href="http://www.aol.com">AOL for 
Mac OS X</a> and <a href="http://www.compuserve.com">CompuServe 7</a>.
Due to possible <a href="http://devedge.netscape.com/viewsource/2002/browser-detection/">browser 
detection</a> and network issues, you'll want to verify 
that all areas of your site load and function correctly. 
</p>
<p>
Visit <a href="http://devedge.netscape.com/central/gecko">Netscape Gecko Central</a> 
for additional information and links. 
<a href="http://webmaster.aol.com">Webmaster@AOL</a> has further information 
regarding compatibility with AOL's service.
</p>
<p>
<strong>
Evaluating Your Site
</strong>
</p>
<p>
Want to see right away how your site works with Gecko-based browsers? If you're using user-agent detection, 
try the User-Agent Toolbar:
</p>
<ol>
<li>
Launch <a href="http://channels.netscape.com/ns/browsers/7/download.jsp">
Netscape 7</a> or <a href="ftp://ftp.mozilla.org/pub/mozilla/nightly/latest-1.0/mozilla-macosX-1.0.smi.bin">
Mozilla 1.0 for OSX</a> (The benefit of using 
Mozilla is that if you're only detecting "Netscape" or "Netscape6" you'll 
see the issues right away.)
</li>   
<li>
Go to the <a href="http://uabar.mozdev.org/source.html">ua bar site</a> 
and click "Install xpi here"
</li>
<li>
After re-starting your browser, select the AOL for Mac OS X
 ua string from the toolbar dropdown list.
</li>
<li>Hit Enter -> click Shift-Reload to reload the page. 
You can verify the string got changed by looking under Help | About.
</li>
</ol>
<p>
Then test using the ua string for CompuServe 7: Mozilla/5.0 
(Windows; U; Win98; en-US; rv:0.9.4.2) Gecko/20020502 CS 2000 7.0/7.0. But as mentioned 
previously, it's best if you can download the actual client for testing.
</p>
<p>
We also strongly recommend you do not detect these entire 
strings but instead use more efficient methods to lower 
your maintenance, as newer 
versions may be launched with changes in the date, for example. 
[<a href="http://devedge.netscape.com/viewsource/2002/browser-detection/">Related article</a>]
</p>
<p>
<strong>Reviewing Your Results</strong>
</p>
<p>
a) Site look funny?  If your site is already
 Netscape 6 compatible, then try switching back to a Netscape 6 
ua string. If it looks ok, you're probably detecting 
only "Netscape" or "Netscape6." Detecting "Gecko" instead 
is the easy way to fix this. 
[<a href="http://devedge.netscape.com/viewsource/2002/browser-detection/">Related article</a>]
</p>
<p>
NOTE: Detecting "Gecko" will also "fix" your site for users of Mozilla, CompuServe 7, etc.
</p>
<p>
b) Still look funny? Try picking the IE 6 string. If this works, 
set up your detection to serve IE 6 content to visitors with "Gecko" in their ua strings.
</p>
<p>
c) Give up? Please take a look at the <a href="#diagnose">troubleshooting 
section</a> of this handbook.
</p>
<strong>Testing From Within a Firewall</strong>
<p>
If you need to connect to AOL via a corporate firewall, 
America Online has registered TCP/IP ports 5190 and 11523 so you can communicate with the 
AOL client software. This way you can test your site on the AOL client from behind your firewall, 
provided that your network administrators will open these ports. 
</p>
<p>
You need to be connected to the Internet to test your site on AOL; 
it isn't possible to access your site on a local 
machine via your LAN, without an Internet connection. 
</p>
<strong>Preparing Customer Support Information</strong>

   <p>
If your site lists system requirements or caveats, 
because your visitors will not know what "Netscape Gecko" 
is, we recommend that you use specific browser names as needed:
   </p>
   <p>
<ul>
<li>AOL for Mac OS X</li>
<li>CompuServe 7</li>
<li>Netscape 6+</li>
<li>Mozilla</li>
</ul>
   </p>
    <hr />

    <h2>
      <a name="diagnose">Quick Reference: Web Site Problems/Solutions</a>
    </h2>

    <table border="1" cellspacing="0">
      <thead>
        <tr>
          <th>Symptom</th>

          <th>Possible Problem</th>

          <th>Solution</th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td>Content differs in Netscape Gecko browsers and
          Internet Explorer</td>

          <td>Use of Proprietary Markup
          <br />

          Use of Invalid Markup
          <br />
          </td>

          <td>Use the W3 HTML and CSS Validator 
          <a href="#tools">tools</a>

          to validate the web page. Correct any errors and replace
          proprietary code wherever possible.</td>
        </tr>

        <tr>
          <td>Site works correctly in Netscape 6 but not Netscape 7
          or other browsers based upon Netscape Gecko.</td>

          <td>The browser detection JavaScript detects Netscape 6
          but does not detect other Gecko-based browsers.</td>

          <td>Upgrade the browser detection JavaScript to detect
          "Gecko." [
          <a
          href="http://devedge.netscape.com/viewsource/2002/browser-detection/"
          target="_top">related article</a>

          ]</td>
        </tr>

        <tr>
          <td>Content differs in Netscape Gecko browsers and
          Internet Explorer</td>

          <td>Incorrect Browser Sniffing
          <br />

          Use of Proprietary JavaScript
          <br />

          <p>The JavaScript Console in Netscape 6 and 7 displays
          errors about document.all, document.layers,
          document.&lt;property&gt; not being defined.</p>
          </td>

          <td>Update 
          <a
          href="http://devedge.netscape.com/viewsource/2002/browser-detection/">
          browser sniffing</a>

          to correctly detect Netscape Gecko browsers.
          <br />

          Upgrade APIs to use newer standards-conformant versions
          <br />

          <a href="#xbrowser-tools">Upgrade</a>

          web authoring tool to versions that support the W3
          standards and Netscape Gecko browsers</td>
        </tr>

        <tr>
          <td>Content differs in Netscape Gecko browsers and
          Internet Explorer</td>

          <td>Your CSS relies on bugs in Internet Explorer's
          implementation of CSS. 
          <p>Internet Explorer incorrectly treats ID's and CLASS
          names as case insensitive while Netscape Gecko treats
          them correctly as case sensitive. Inconsistent case
          between the CSS defining the style for HTML ID's and
          CLASSes results in Netscape Gecko browsers not applying
          the styles to ID's or CLASS names that differ in
          case.</p>

          <p>Internet Explorer incorrectly specifies height and
          width of inline elements such as SPAN.</p>

          <p>Internet Explorer implements the box model (padding,
          margins, borders) incorrectly.</p>
          </td>

          <td>Do not use Internet Explorer's invalid implementation
          of CSS. Use only the cross-browser, standards conformant
          features of CSS. Use consistent case when writing HTML ID
          and CLASS name attributes and CSS Styles for those IDs
          and CLASSes. Do not specify heights or widths on inline
          elements such as SPANs. Use only cross-browser box
          specifications for margins, padding and borders. [
          <a href="http://devedge.netscape.com/central/css/">more on CSS</a>

          ]</td>
        </tr>

        <tr>
          <td>Content differs in Netscape Gecko browsers and
          Internet Explorer</td>

          <td>Incorrect Layout mode specified by DOCTYPE
          <br />
          </td>

          <td>If pages should be displayed by legacy browsers such
          as Netscape Navigator 4 or Internet Explorer 4 and 5, be
          sure to specify Quirks mode layout via the DOCTYPE. [
          <a href="#doctype">more info</a>

          ]</td>
        </tr>

        <tr>
          <td>Images are laid out without intervening blank areas
          in Interent Explorer but display blank areas between the
          images in Netscape Gecko browsers.</td>

          <td>Incorrect Layout mode specified by DOCTYPE</td>

          <td>Standards Mode Layout has been specified by the
          DOCTYPE. Change the DOCTYPE to request Quirks mode layout
          instead. [
          <a href="#doctype">more info</a>

          ]</td>
        </tr>

        <tr>
          <td>Clicking a link results in a 404-Page not found but
          works in Internet Explorer</td>

          <td>The link may use an invalid form of a relative
          URL.</td>

          <td>Change relative URLS from http://directory/... to
          directory/.... or use absolute paths in URLS such as
          http://server/directory/...</td>
        </tr>

        <tr>
          <td>Clicking on a link displays a "download" but works as
          expected in Internet Explorer</td>

          <td>The Web Server has incorrectly specified the MIME
          type for the content. Internet Explorer tries to guess
          the MIME type of documents while Netscape Gecko browsers
          relies upon the Web Server to specify the correct MIME
          type. Netscape Gecko does not try to 'sniff' the MIME
          type for a document in order to reduce the possibility of
          unsecure, dangerous content masquerading as as a safe
          MIME type.</td>

          <td>Use Perl's HEAD utitility to determine the actual
          MIME type being used by the Web Server. Correct any
          incorrect Server MIME types. [
          <a
          href="http://devedge.netscape.com/viewsource/2002/incorrect-mime-types/">
          related article</a>

          ]</td>
        </tr>

        <tr>
          <td>Connecting to a secure site fails, but connects in
          Internet Explorer</td>

          <td>The Web Server does not properly implement the fall
          back negotiation for SSL.</td>

          <td>The Web Server administrator needs to pgrade the SSL
          software. In order to use a site with a defective
          implementation of SSL, visitors need to disable TLS in
          their Netscape 6/7 or Mozilla browser until the site has
          upgraded to software that correctly implements SSL.</td>
        </tr>

        <tr>
          <td>DHTML Menus implemented using HierMenu do not work or
          place the popup in the wrong position.</td>

          <td>The HierMenu version is obsolete. The earliest
          version of HierMenu only supported Netscape Navigator 4.x
          and Internet Explorer 4.x and above. Later versions did
          support Netscape 6; however, in Netscape 6.1 and higher,
          support for Internet Explorer's proprietary offsetXXX
          properties results in HierMenu placing 
          <em>popups</em>

          in the wrong position. The most recent versions of 
          <a href="http://www.webreference.com/dhtml/hiermenus/">
          HierMenu</a>

          fully support all Netscape Gecko based browsers.</td>

          <td>Upgrade to the most recent version of 
          <a href="http://www.webreference.com/dhtml/hiermenus/">
          HierMenu</a>

          .</td>
        </tr>
      </tbody>
    </table>

    <br />

    <br />
    <h2>
      <a name="xbrowser">In-depth: Problems Due to Existing Coding Techniques</a>
    </h2>

    <p>In this section we detail the most common causes of the
    problems affecting standards-based browsers and how to avoid
    them.</p>

    <ol>
      <li>
        <a name="xbrowser-markup">
          <b>Using Browser-Specific Proprietary HTML Markup (such
          as LAYERS).</b>
        </a>

        <p>Since a browser is supposed to ignore HTML tags it does
        not recognize and render the content inside the tags, Web
        page authors have used the technique of combining
        proprietary HTML that will work as expected in each
        browser.</p>

        <p>Netscape Gecko browsers will ignore both Internet
        Explorer and Netscape Navigator 4 proprietary HTML tags.
        So, a page may not display in Netscape Gecko browsers as it
        does in Internet Explorer 4 or in Netscape Navigator 4.</p>

        <p>The prime example of this is the use of Netscape
        Navigator 4 proprietary LAYER, commonly used in site
        navigation. For standards-based alternatives, see 
        <a
        href="http://devedge.netscape.com/viewsource/2001/updating-dhtml-web-pages/">
        Updating DHTML Web Pages for Next Generation Browsers</a>

        .</p>

        <p>An HTML page can be quickly checked for the use of
        proprietary HTML Markup by submitting the page to the 
        <a href="http://validator.w3.org/">W3's HTML Validator</a>

        using the HTML 4.01 DOCTYPE. We will have more to say about
        DOCTYPEs later in this article, but essentially the DOCTYPE
        is supposed to indicate to a browser what version of HTML
        is used in the page.</p>

        <p>The 
        <a href="http://devedge.netscape.com/library/xref/2001/html-element/"  
        target="_top">HTML Element Cross Reference</a>

        provides a list of all HTML Elements supported in Netscape
        4, Netscape Gecko browsers, Internet Explorer 4 and up and
        can be used to determine which HTML Elements are supported
        by all browsers.</p>
      </li>

      <li>
        <a name="xbrowser-sniffing">
          <b>Using Browser Detection or Sniffing</b>
        </a>

        <p>While browser detection is useful in enabling authors to code 
	pages that work only in specific browsers, improper
        browser detection can lead to major user experience
        breakages. [
        <a href="http://devedge.netscape.com/viewsource/2002/browser-detection">
         related article]</a>
        </p>

        <p>Web pages that use JavaScript can detect which browser
        is being used to view them either by looking at the 
        <code>navigator</code>

        object or by detecting proprietary features in a browser's
        JavaScript implementation.</p>

        <p>Alternatively, web page authors can 
        <em>dynamically</em>

        write browser specific HTML depending upon the browser
        being used to view the web page. This is done both in the
        web page itself using the JavaScript 
        <code>document.write</code>

        function and on the web server to output browser specific
        HTML and JavaScript.</p>

        <p>Three problems can occur when a web page uses browser
        detection to determine which proprietary features to use
        for a particular browser:</p>

        <ol>
          <li>
          <b>The page mistakenly identifies Netscape Gecko as if it
          is Netscape Navigator 4</b>

          . 
          <p>The following example uses the 
          <code>navigator</code>

          object and its properties to detect which browser is
          viewing the page.</p>

<pre>
&lt;script language="JavaScript"&gt;
if (navigator.appName == "Netscape")
  document.write('&lt;link rel="stylesheet" type="text/css"
href="nn4.css"');
else if (navigator.appName == "Microsoft Internet Explorer") 
  document.write('&lt;link rel="stylesheet" type="text/css"
href="ie4.css"');

if (navigator.appName == "Netscape")
  obj = document.layers['id'];
else if (navigaor.appName == navigator.appName == "Microsoft
Internet Explorer") 
  obj = document.all['id'];

&lt;/script&gt;
</pre>

          <p>Note how the above code does not distinguish between
          Netscape Gecko and Netscape Navigator 4. This results in
          two problems in the above conde:</p>

          <p>1) The JavaScript will present a Netscape Navigator 4-specific 
          CSS Style sheet to Netscape Gecko. The CSS that
          is appropriate for the buggy implementation of CSS in
          Navigator 4 is not appropriate for the
          standards-compliant Netscape Gecko . Symptoms of this
          problem are improper appearance of a web page.</p>

          <p>2) The JavaScript will attempt to use the 
          <code>document.layers</code>

          object which will result in an error since Netscape
          Navigator 4 supports the proprietary 
          <code>document.layer</code>

          object while Netscape Gecko does not. Symptoms of this
          problem are JavaScript errors for 
          <code>document.layers</code>

          , 
          <code>document.
          <em>layername</em>
          </code>

          , x and y properties of Image objects not being defined,
          etc.</p>

          <p>A related problem is due to the use of 
          <a
          href="http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html"
           target="_top">Ultimate Browser Sniffer</a>

          .</p>

<pre>
&lt;script language="JavaScript"
src="ultimate-sniffer.js"&gt;&lt;/script&gt;
&lt;script language="JavaScript"&gt;

if (is_nav4up)
  document.write('&lt;link rel="stylesheet" type="text/css"
href="netscape.css"');
else if (is_ie4up) 
  document.write('&lt;link rel="stylesheet" type="text/css"
href="ie.css"');

&lt;/script&gt;
</pre>

          <p>The problem with the Ultimate Browser sniffer 
          <code>is_nav4up</code>

          variable is that it will be true for both Netscape
          Navigator 4 and Netscape Gecko browsers. Therefore, pages
          that use the is_nav4up will inappropriately treat
          Netscape Gecko as though it were Netscape Navigator 4.
          Unfortunately, web developers were encouraged to code
          using the is_nav4up and is_ie4up variables, since the
          belief at the time was that any later version of Netscape
          would be compatible with Netscape Navigator 4.
          This is unfortunately not the case.</p>
          </li>

          <li>
            <b>The page does not recognize Netscape Gecko at
            all.</b>

<pre>
&lt;script language="JavaScript"&gt;

if (document.layers)
  document.write('&lt;link rel="stylesheet" type="text/css"
href="netscape.css"');
else if (document.all) 
  document.write('&lt;link rel="stylesheet" type="text/css"
href="ie.css"');

&lt;/script&gt;
</pre>

            <p>Note how the above checks for Netscape Navigator 4
            (document.layers) and Internet Explorer 4 and above
            (document.all) but completely misses Netscape Gecko
            browsers where neither proprietary API is
            implemented.</p>
          </li>

          <li>
            <b>The page may recognize Netscape Gecko but not
            recognize other browsers based upon Netscape Gecko.</b>

<pre>
&lt;script language="JavaScript"&gt;

var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('netscape6') != -1)
  document.write('&lt;link rel="stylesheet" type="text/css"
href="netscape.css"');
else if (document.all) 
  document.write('&lt;link rel="stylesheet" type="text/css"
href="ie.css"');

&lt;/script&gt;
</pre>
          </li>
        </ol>

        <p>Please see the 
        <a href="http://devedge.netscape.com/viewsource/2002/browser-detection/">
        Browser Detection and Cross Browser Support</a> article 

        for a better approach to detecting browsers.</p>
      </li>

      <li>
        <a name="xbrowser-bugs">
          <b>Depending on bugs and browser-specific quirks</b>
        </a>

        <p>Since a Web page is judged not by how well it is written
        but by how well it displays in a browser, authors have
        developed many techniques which take advantage of
        idiosyncracies in particular browsers to achieve the
        desired effect. This is of particular importance since the
        early implementations of CSS found in Internet Explorer 4
        and Netscape Navigator 4 had many bugs. In order to achieve
        the desired effects on a page, authors wrote HTML and
        JavaScript which depended upon these bugs in order to work
        properly.</p>

        <p>This can cause problems in Netscape Gecko browsers since
        it implements the standards strictly. The old "code to the
        bugs" approach will not work for Netscape 6 and 7 and other
        Mozilla based browsers.</p>

        <p>
          <b>Example - Putting forms in Tables</b>
        </p>

        <p>INVALID HTML to eliminate line break in FORM</p>

        <p>In older browsers, this results in the TD cell tightly
        wrapping around the input element.</p>

<pre>
&lt;table border="1"&gt;
&lt;tr&gt;
&lt;form name="form2"&gt;
&lt;td&gt;
&lt;input type="text"&gt;
&lt;/td&gt;
&lt;/form&gt;
&lt;/tr&gt;
&lt;table&gt;
</pre>

        <p>This approach is commonly used to get around the fact
        that FORM is a block level element in HTML and will
        naturally begin on a new line in the page. Unfortunately,
        this is invalid HTML and can cause problems both when
        parsing the page and when applying the CSS styles.</p>

        <p>
          <b>Incorrect Use of XML Empty Tag notation</b>
        </p>

        <p>Many people have taken to using XML Empty tag notation (
        &lt;tag /&gt; ) in their HTML files. In XML, an Empty tag 
        <b>NEVER</b>

        has any content. The XHTML backward compatibility
        guidelines state that 
        <strong>Empty</strong>

        Elements can be coded by following the tag name with a
        space followed with as slash as in &lt;tag /&gt;. To be
        backwardly compatible you 
        <strong>must</strong>

        have a space before the trailing /&gt;. In addition, you
        must only use the XML Empty tag notation for HTML Elements
        that are always Empty - and not for HTML Elements that have
        optional ending tags.</p>

        <p>For example, it is ok to code &lt;br&gt; as &lt;br /&gt;
        although there is no benefit to do so in HTML documents.
        But it is 
        <b>NOT</b>

        ok to code &lt;OPTION&gt; as &lt;OPTION /&gt;. To
        understand why, consider the following:</p>

        <table cellpadding="1" cellspacing="0" border="1">
          <thead>
            <tr>
              <th>HTML without optional ending tags</th>

              <th>Equivalent HTML with optional ending tags</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>&lt;select&gt;
              <br />

              &lt;option&gt;OptionValue
              <br />

              &lt;/select&gt;
              <br />
              </td>

              <td>&lt;select&gt;
              <br />

              &lt;option&gt;OptionValue&lt;/option&gt;
              <br />

              &lt;/select&gt;
              <br />
              </td>
            </tr>
          </tbody>
        </table>

        <p>Now consider if we used the XML Empty tag notation: the
        &lt;OPTION /&gt;</p>

        <table cellpadding="1" cellspacing="0" border="1">
          <thead>
            <tr>
              <th>HTML with XML Empty Tag notation</th>

              <th>Equivalent HTML with ending tags</th>
            </tr>
          </thead>

          <tbody>
            <tr>
              <td>&lt;select&gt;
              <br />

              &lt;option /&gt;OptionValue
              <br />

              &lt;/select&gt;
              <br />
              </td>

              <td>&lt;select&gt;
              <br />

              &lt;option&gt;&lt;/option&gt;OptionValue
              <br />

              &lt;/select&gt;
              <br />
              </td>
            </tr>
          </tbody>
        </table>

        <p>This is simply not correct. If you must use the XML
        Empty tag notation, then only do so for HTML Elements that 
        <b>NEVER</b>

        have any content - 
        <b>NOT</b>

        for HTML Elements that have optional ending tags.</p>

        <p>
          <b>CSS ID's should be case-sensitive</b>
        </p>

        <p>Netscape Gecko implements the case sensitivity of Class
        ID's correctly and will display this example correctly.
        However Internet Explorer treats all CSS ID's as
        case-insensitive and will not display this example
        correctly.</p>

<pre>
&lt;style type="text/css"&gt;
#id1 { text-decoration: line-through; }
#ID1 { text-decoration: underline; }
&lt;/style&gt;
&lt;div id="id1"&gt;
should be line-through
&lt;/div&gt;
&lt;div id="ID1"&gt;
should be underline
&lt;/div&gt;
</pre>

        <div id="id1">should be line-through</div>

        <div id="ID1">should be underline</div>

        <p>Note that the W3C's 
        <a href="http://validator.w3.org/">HTML Validator</a>

        will flag HTML ID attributes as duplicates if they only
        differ due to case. There appears to be some inconsistency
        between the actual HTML 4.01 Recommendation and the SGML
        declaration for HTML on whether ID attributes are case
        sensitive or not. This is unfortunate since the 
        <a href="http://validator.w3.org/">HTML Validator</a>

        is one of the primary vehicles web developers have for
        learning about the standards.</p>

        <p>Due to the common nature of this error, Netscape 6.2
        began treating CSS ID attributes as case-insensitive in 
        <strong>Quirks mode only</strong>

        . If you are invoking Standards mode, you should still code
        your CSS to be consistent with respect to case. Please note
        that this document uses 
        <a href="#doctype">Quirks mode</a>

        .</p>

        <p>
          <b>CSS Class names should be case-sensitive</b>
        </p>

<pre>
&lt;style type="text/css"&gt;
.class1 { font-size: 1em; }
.CLASS1 { font-size: 2em; }
&lt;/style&gt;
&lt;div&gt;
&lt;div class="class1"&gt;
should be font-size: 1em;
&lt;/div&gt;
&lt;div class="CLASS1"&gt;
should be font-size: 2em;
&lt;/div&gt;
</pre>

        <div class="class1">should be font-size: 1em;</div>

        <div class="CLASS1">should be font-size: 2em;</div>

        <p>Netscape Gecko implements the case sensitivity of Class
        names correctly and will display this example correctly
        while Internet Explorer treats all CSS Classnames's as
        case-insensitive and will not display this example
        correctly.</p>

        <p>Due to the common nature of this error by web authors,
        Netscape 6.2 began treating CSS Class attributes as
        case-insensitive in 
        <strong>Quirks mode only</strong>

        . If you are invoking Standards mode, you should still code
        your CSS to be consistent with respect to case. Please note
        that this document uses 
        <strong>Quirks mode</strong>

        .</p>

        <p>
          <b>Incorrect Relative URLs</b>
        </p>

        <p>A Relative URL is one which refers to the same web
        server where a web page is hosted. A Relative URL that
        refers to a path relative to the directory where a Web page
        is located looks like 
        <code>path/file.html</code>

        . Relative URLs that refer to a path relative to the web
        server's root directory look like 
        <code>/path/file.html</code>

        .</p>

        <p>Older browsers supported the 
        <b>INVALID</b>

        use of http://path/ for URLs relative to a web server's
        root directory but Netscape Gecko browsers do not. To
        correctly specify a web page relative to a web server's
        root directory, use URLs of the form 
        <code>/path/file.html</code>

        .</p>

        <p>
          <b>Invalid use of spaces in name Attributes (such as
          image maps)</b>
        </p>

        <p>Many authors seem to be infected by a penchant to use
        spaces in names. A 
        <a href="http://www.w3.org/TR/html401/types.html#h-6.2">
        name or id</a>

        attribute in HTML 4.01 may not legally contain spaces. This
        can cause problems with Gecko based browsers especially in
        image maps. You should make sure that your 
        <code>name</code>

        attributes are coded using valid characters only.</p>
      </li>

      <li>
        <a name="xbrowser-tools">
          <b>Use of Obsolete APIs or Web Authoring tools</b>
        </a>

        <p>Many older versions of cross-browser APIs in common use
        around the web such as DYNAPI do not support Netscape Gecko
        for one or more of the reasons listed above. This is also
        the case for older versions of web authoring tools such as
        Macromedia's Dreamweaver 2 and 3.</p>

        <p>Newer versions of these APIs and tools do support
        Netscape Gecko however. For example, DYNAPI is now
        maintained at 
        <a href="http://dynapi.sourceforge.net/dynapi/">
        SourceForge</a>

        and offers a Netscape Gecko-compatible version. Newer
        versions of web authoring tools such as 
        <a href="http://www.adobe.com/products/golive/main.html">
        Adobe GoLive 6</a>

        support Netscape Gecko. The following software updates are
        also available:</p>

        <ul>
          <li>
            <a
            href="http://www.macromedia.com/support/dreamweaver/ts/documents/netscape_6.htm">
            Dreamweaver 4 update</a>
          </li>

          <li>
            <a
            href="http://www.adobe.com/support/techdocs/2814e.htm">
            Adobe GoLive 5.0 update</a>
          </li>
        </ul>
      </li>
    </ol>

    <h2>
      <a name="doctype">Problems due to inappropriate DOCTYPE
      specifications</a>
    </h2>

    <p>Standards related to CSS and Layout pose a problem for web
    page authors wanting to support older browsers such as Internet
    Explorer 4 and Netscape Navigator 4. These browsers do not
    implement W3 Standards correctly, unlike newer browsers such as
    Netscape 7. How is a Web page author to write web pages so that
    the page will display as intended in all of these browsers?</p>

    <p>Netscape Gecko, Internet Explorer for Mac OS and
    Internet Explorer 6 all use a technique called DOCTYPE sniffing
    to determine if a page is to be laid out in a fashion
    compatible with the older browsers or if it is to be laid out
    in a fashion compatible with the W3 standards.</p>

    <p>Using the appropriate DOCTYPE in an HTML document allows a
    web page author to continue to support the older, less
    compliant browsers while also supporting the newer, more
    compliant browsers by specifiying special Quirks mode layout
    via the DOCTYPE. As time progresses and the older browsers drop
    in market share, web page authors can transition to
    standards-based layout by using the appropriate DOCTYPE. [
    <a href="http://devedge.netscape.com/viewsource/2001/validate/">related article</a>

    ]</p>

    <p>While DOCTYPE sniffing is a useful means of continuing to
    support the older browsers, it can be a problem for newer
    browsers such as Netscape 6 and 7 if an inappropriate Layout
    mode is specified.</p>

    <p>Netscape Gecko has two layout modes: Quirks and Standard.
    Quirks mode mimics the behavior of Netscape Navigator 4 while
    Standards mode follows the W3C Recommendations for HTML and
    CSS. In particular, Standards Layout Mode uses the CSS Box
    Model as defined in 
    <a href="http://www.w3.org/TR/REC-CSS2/visudet.html">Chapter
    10</a>

    of the CSS 2 Recommendation. The mode is picked based on the
    doctype declaration (or the lack thereof) at the beginning of
    an HTML document.</p>

    <p>Netscape Gecko also has two parsing modes: Quirks and
    Standard. Quirks mode allows the use of invalid comments
    containing two dashes -- while Strict modes does not. 
    <br />

    &lt;!---- This is an invalid HTML Comment accepted in Quirks
    Comment Parsing ----&gt;
    <br />

    &lt;!-- This is a valid HTML Comment accepted in Stricts
    Comment Parsing --&gt;
    <br />
    </p>

    <p>For the exact rules on which DOCTYPEs invoke Quirks vs
    Standards mode see 
    <a
    href="http://mozilla.org/docs/web-developer/quirks/doctypes.html">
    Mozilla's DOCTYPE sniffing</a>

    article.</p>

    <h2>
      <a name="plugins">Problems Related to Plugins</a>
    </h2>

    <p>You'll find for that some plugins behave differently in
    Netscape Gecko than in Netscape Navigator 4. Visit 
    <a href="http://devedge.netscape.com/central/plugins/"
    title="Plugins Central">DevEdge Plugins Developer Central</a>

    to learn about the features leading plugin vendors support in
    Netscape Gecko browsers, changes in the plugin architecture vs.
    the Netscape 4 generation, and suggested plugin strategies.</p>
<p>
Plugins that are now scriptable with Netscape Gecko browsers, 
so your players can "talk" to web pages, inclunde: 
Apple QuickTime 6, Macromedia Flash 6 r47, RealPlayer 8 and RealOne. 
</p>

    <h2>
      <a name="servers">Problems due to Web Servers</a>
    </h2>

    <ul>
      <li>
        <a name="servers-mime">Incorrectly specified MIME types</a>

        <p>Many Web servers have incorrectly specified MIME types
        for files. Of particular interest to Netscape Gecko
        browsers are the following:</p>

        <p>
          <ul>
            <li>HTML - text/html</li>

            <li>CSS - text/css [
            <a
            href="http://devedge.netscape.com/viewsource/2002/incorrect-mime-types/">
            related article</a>

            ]</li>

            <li>XML - text/xml</li>
          </ul>
        </p>
      </li>

      <li>
        <a name="servers-http">Faulty implementations of HTTP</a>

        <p>Several Web Servers incorrectly implement the HTTP
        protocol which can result in problems for Netscape 6.</p>
      </li>

      <li>
        <a name="servers-ssl">Faulty implementations of SSL</a>

        <p>Older browser such as Internet Explorer 4 and Netscape
        Navigator 4 implemented older versions of the Secure
        Sockets Layer (SSL) protocol. The most common version of
        SSL on the web today is SSL 3.0, however the newest version
        TLS ( SSL 3.1 ), which is supported by Netscape Gecko
        browsers is not supported by many Web Servers today.
        Unfortunately, several implementations of SSL 3.0
        incorrectly implement the negotiation of which version of
        SSL to use and fail to connect to Netscape Gecko
        browsers.</p>

        <p>For more detail on this issue, please read 
        <a href="http://devedge.netscape.com/viewsource/2001/tls-ssl3/">Notes on
        TLS/SSL 3.0 Intolerant Servers</a>

        .</p>
      </li>
    </ul>

    <hr />

    <h2>
      <a name="resources">Useful Resources</a>
    </h2>

    <ul>
      <li>See 
      <a href="http://devedge.netscape.com/">DevEdge</a>

      for a complete list of articles, tools, and other
      resources.</li>

      <li>Beginning to intermediate Web Authors can look to the 
      <a href="http://devedge.netscape.com/toolbox/tools/2001/tune-up/">DevEdge Web Tune Up
      Wizard</a>

      for pointers on areas where content needs to be updated to
      support Netscape Gecko and other browsers that support the
      W3C standards.</li>

      <li>
      <a
      href="http://webmaster.info.aol.com/index.cfm?article=500000000000043&amp;expand=0&amp;sitenum=2&amp;menuid=58">
      AOL Webmaster.info Site - Developing for Netscape Gecko</a>

      covers common issues facing webmasters, and how to update
      your code.</li>
    </ul>

    <h2>
      <a name="tools">Diagnostic Tools</a>
    </h2>

    <p>The W3C provides several tools that are invaluable when
    diagnosing web page problems:</p>

    <ul>
      <li>
      <a href="http://validator.w3.org/" target="_top">W3C HTML
      Validator</a>: 

      The W3C HTML Validator will validate any Web page
      according to the W3C HTML standards. It is very useful in
      detecting the use of proprietary HTML as well as in detecting
      invalid HTML.</li>

      <li>
      <a href="http://jigsaw.w3.org/css-validator/" target="_top">
      W3C CSS Validator</a>: 

      The W3C CSS Validator will validate the CSS contained in
      any Web page or external CSS files according to the W3C CSS
      standards. It is very useful in detecting invalid CSS.</li>

      <li>
      <a href="http://tidy.sourceforge.net" target="_top">HTML
      Tidy</a>: 

      HTML Tidy is a tool that can be used to report on errors
      in an HTML page and can be used to format web pages for
      better reading.</li>

      <li>
      <a href="http://www.mozilla.org/projects/venkman/" target="_top">
      Mozilla.org JavaScript Debugger</a>: 

      Mozilla.org is working on a powerful JavaScript 
      debugging environment for Netscape Gecko-based browsers, 
      including the Netscape 7.x series of browsers.</li>
      <li>
        <p>Perl also is a useful tool for diagnosing the response
        of Web Servers. 
        <a href="http://www.perl.com/" target="_top">Perl</a>

        is a standard language interpreter available for both Unix
        and 
        <a href="http://www.activestate.com/" target="_top">
        Windows</a>

        platforms. A standard utility called HEAD is available with
        Perl distributions that can be used to view the HTTP
        headers sent by a Web Server.</p>
      </li>
    </ul>

    <h2>
      <a name="reporting">Problem Reporting</a>
    </h2>

    <ul>
      <li>
        <a
        href="http://www.mozilla.org/quality/help/bugzilla-helper.html"
         target="_top">Mozilla/Netscape browser or web site problem
        reporting</a>
      </li>

      <li>
        <a href="http://devedge.netscape.com/community/" target="_top">DevEdge
        Community</a>
      </li>
    </ul>

    <h2>
      <a name="references">References</a>
    </h2>

    <ul>
      <li>
        <a
        href="http://webmaster.info.aol.com/index.cfm?article=500000000000043&amp;expand=0&amp;sitenum=2&amp;menuid=58">
        AOLWebmaster.info Site</a>: AOL compatibility information
      </li>

      <li>
        <a href="http://devedge.netscape.com/toolbox/tools/2001/tune-up">DevEdge Web Tune-up
        Wizard</a>
      </li>

      <li>
        <a
        href="http://www.mozilla.org/docs/web-developer/upgrade_2.html"
         target="_top">Using Web Standards in Your Web Pages</a>
      </li>

      <li>
        <a href="http://devedge.netscape.com/viewsource/2002/browser-detection/"
        target="_top">Browser Detection and Cross Browser Support</a>
      </li>

      <li>
        <a
        href="http://devedge.netscape.com/viewsource/2001/updating-dhtml-web-pages/"
         target="_top">Updating DHTML Web Pages</a>
      </li>

      <li>
        <a href="http://devedge.netscape.com/library/xref/2001/html-element/"
        target="_top">HTMLElement Cross Reference</a>
      </li>

      <li>
        <a href="http://devedge.netscape.com/library/xref/2002/client-data/"
          target="_top">Client Object Cross Reference</a>
      </li>

      <li>
        <a
        href="http://www.mozilla.org/docs/web-developer/xbdhtml/xbdhtml.html"
         target="_top">Introduction to Cross-Browser JavaScript and
        Dynamic HTML</a>
      </li>
    </ul>

  </nde:content>
</nde:article>

