Manuel de compatibilité Gecko

  • Raccourci de la révision : Manuel_de_compatibilité_Gecko
  • Titre de la révision : Manuel de compatibilité Gecko
  • ID de la révision : 271391
  • Créé :
  • Créateur : Fredchat
  • Version actuelle ? Non
  • Commentaire /* Web Server Configuration Problems */

Contenu de la révision

{{template.Traduction_en_cours("Gecko Compatibility Handbook")}} L'objectif de ce manuel est de vous aider à mettre à jour vos sites Web pour qu'ils s'affichent correctement dans les navigateurs respectants les standards du Web et pour détecter correctement Gecko.

Si vous ne connaissez pas les standards du Web, vous devriez consulter Using Web Standards in Your Web Pages.

Gecko est un navigateur Web embarquable, développé comme composante du projet open source Mozilla. Il est basé sur les Standards W3 plutôt que sur une approche propriétaire typique des solutions passées. Le respect des standards du Web simplifie la compatibilité inter-navigateurs lors du développement et permet de mettre en oeuvre des solutions d'accessibilité.

4.x contre Gecko

Depuis 1997, de nombreux sites internet ont été conçus pour fonctionner avec Microsoft Internet Explorer 4 ou Netscape Navigator 4. Ces navigateurs ont été développés avant que les recommandations du W3C pour HTML, CSS, et le DOM n'existent.

Plus récemment, les navigateurs ne respectant pas les standards du Web s'opposent à Gecko sur plusieurs points :

  • Ces navigateurs utilisent du code HTML, CSS, et JavaScript propriétaires (non standards).
  • Internet Explorer 4 et Netscape Navigator 4 se partagent le support de la plupart des standards HTML 3.2 et du JavaScript de base.
  • Alors qu'ils supportent à peu près le standard CSS 1, son implémentation n'est pas complète et comprend des fonctionnalités non standards supplémentaires.
  • Ni Internet Explorer 4 ni Netscape Navigator 4 ne supporte le DOM du W3. À la place, chacun supporte sa propre API propriétaire de manipulation du contenu, du style et de la position des éléments HTML dans une page Web.
  • De plus, Internet Explorer 4 et Netscape Navigator 4 utilisent des méthodes complètement différentes pour inclure des logiciels tiers dans leur navigateurs.

Gecko est un moteur de rendu multiplate-forme, compatible avec un grand nombre de versions de systèmes d'exploitation, dont Windows XP, Mac OS et Linux. De par la nature multiplate-forme de Gecko, ses fonctionnalités sont en général les mêmes entre les plates-formes, contrairement aux versions Mac et Windows d'Internet Explorer qui sont des programmes distincts qui se comportent de façons différentes.

Test de compatibilité rapide

Si votre site utilise les technologies propriétaires de Netscape 4.x et de Microsoft, lisez l'article Using Web Standards in Your Web Pages pour prendre rapidement connaissances des principes de bases des standards. Ce test de compatibilité sera d'autant plus bénéfique pour les sites utilisant un code simple ou ayant commencé une mise à jour pour supporter les standards.

Préparer les navigateurs à tester

Les nombreux navigateurs utilisant Gecko ne contiennent pas tous <tt>Netscape</tt> dans leur chaîne user-agent. Ainsi, il est important de vérifier que vous détectez correctement les navigateurs, tel que AOL pour Mac OS X.

Vous pouvez télécharger un certain nombre de navigateurs. Ou, si vous utilisez la détection du user-agent, vous pouvez installer une extension pour Firefox ou Mozilla qui vous permettra de « simuler » les chaînes user-agent de ces navigateurs Gecko. Voici comment faire :

  1. Lancez Mozilla ou Firefox. L'avantage d'utiliser ces navigateurs est qu'en détectant uniquement les chaînes <tt>Netscape</tt> ou <tt>Netscape6</tt> vous obtiendrez the issues right away.
  2. Installez l'extension User Agent Switcher.
  3. Après le redémarrage de vitre navigateur, ajoutez les chaînes User-Agent pour lesquelles vous désirez tester la détection (<tt>Outils | User Agent Switcher | Options | Options… | User Agents | Ajouter…</tt>). Une fois la boîte de dialogue renseignée (Cela devrait ressembler à la capture ci-dessous), cliquez sur « OK » et fermer la fenêtre « Options ».

    Image:GeckoCompatibilityHandbook-Configure-UASwitcher.PNG
  4. Vous pouvez maintenant commencer à utiliser la chaîne User-Agent que vous venez de créer en cliquant sur <tt>Outils | User Agent Switcher | Le nom que vous avez utilisé</tt>. Vous pouvez vérifier que la chaîne à changée en regardant dans <tt>Aide | À propos</tt>.

Vous pourrez trouver les chaînes User Agent des navigateurs Gecko sur cette page. Si possible, téléchargez également les différents clients (Netscape, AOL, CompuServe) pour les tester.

Examiner vos résultats

Tous les scénarii suivants sont en rapport avec la détection du navigateur. Pour des solutions concernant les problèmes courant veuillez lire la suite de ce manuel.

Problème : Le site respecte les standards Web mais ne s'affiche pas correctement

Essayez d'utiliser la chaîne User Agent de Internet Explorer 6. Si cela fonctionne, paramétrez la détection pour fournir le contenu IE 6 aux visiteurs dont les chaînes User Agent contiennent <tt>Gecko</tt>. IE 6.x est à ce jour, plus proche des navigateurs Gecko que ne l'est Netscape 4.x, de fait d'un support plus récent des standards du W3C.

Problème : Le site certifié Netscape 6.x s'affiche incorrectement dans les autres navigateurs

Si votre site est déj) compatible avec Gecko, essayez de revenir à une chaîne User Agent de Netscape 6. If it looks OK, you're probably detecting only <tt>Netscape</tt> or <tt>Netscape6</tt>. Detecting <tt>Gecko</tt> instead is the easy way to fix this as well as accomodate users of Mozilla, CompuServe 7, etc. (Related article)

Problème : Le site pose problème dans tous les navigateurs Gecko

If you are still seeing problems, take a look at the troubleshooting section of this handbook. Also if you're using Netscape 4.x and Microsoft proprietary technologies, see Using Web Standards in Your Web Pages for a quick tutorial on what's different in Gecko.

AOL or CompuServe Problems

Even if your site works on Netscape 7.x, it is important to test your site in AOL for Mac OS X and CompuServe 7 to check for browser detection and network issues.

Testing AOL From Within a Firewall

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.

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. See Webmaster@AOL for further information.

Solution Quick Reference

As discussed in Mozilla's Using Web Standards in Your Web Pages, coding for cross-browser compatibility requires you write standard markup that Gecko-based browsers, Netscape 4, and IE browsers can render properly.

Symptom Possible Problem Solution
Site works correctly in Netscape 6.x but not Netscape 7.x or other browsers based upon Gecko. The browser detection JavaScript detects Netscape 6.x but does not detect other Gecko-based browsers.
  • Upgrade the browser detection JavaScript to detect "Gecko." (related article)
Content differs in Gecko browsers and Internet Explorer Use of proprietary or invalid markup (such as is generated by some Microsoft Office applications).
  • Use the W3 HTML and CSS Validator Tools to validate the web page. Correct any errors and replace proprietary code wherever possible.
  • Upgrade web authoring tool to versions that support the W3 standards and Gecko browsers
Content differs in Gecko browsers and Internet Explorer The JavaScript Console in Netscape 6.x and Netscape 7.x displays errors about document.all, document.layers, document.<property> not being defined because of an incorrect browser sniffing, or use of proprietary JavaScript.
  • Update browser sniffing to correctly detect Gecko browsers.
  • Upgrade APIs to use newer standards-conformant versions
  • Upgrade web authoring tool to versions that support the W3 standards and Gecko browsers
Content differs in Gecko browsers and Internet Explorer
  • Your CSS relies on bugs in Internet Explorer's implementation of CSS.
  • Internet Explorer incorrectly treats ID's and CLASS names as case insensitive while Gecko treats them correctly as case sensitive. Inconsistent case between the CSS defining the style for HTML ID's and CLASSes results in Gecko browsers not applying the styles to ID's or CLASS names that differ in case.
  • Internet Explorer incorrectly specifies height and width of inline elements such as SPAN.
  • Internet Explorer implements the box model (padding, margins, borders) incorrectly.
  • 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. (more about CSS)
Content differs in Gecko browsers and Internet Explorer Incorrect Layout mode specified by DOCTYPE.
  • 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.
Images are laid out without intervening blank areas in Interent Explorer but display blank areas between the images in Gecko browsers. Incorrect Layout mode specified by DOCTYPE.
  • Standards Mode Layout has been specified by the DOCTYPE. Change the DOCTYPE to request Quirks mode layout instead. more info
Clicking a link results in a 404-Page not found but works in Internet Explorer The link may use an invalid form of a relative URL.
  • Change relative URLs from http://directory/... to directory/.... or use absolute paths in URLs such as http://example.com/directory/...
  • Verify that all hyperlinks use forward slashes (/)
Clicking on a link displays a "download" or displays HTML code instead of rendering the page correctly, but works as expected in Internet Explorer The Web Server has incorrectly specified the MIME type for the content. Internet Explorer tries to guess the MIME type of documents while Gecko browsers relies upon the Web Server to specify the correct MIME type. 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.
  • Use Perl's HEAD utitility to determine the actual MIME type being used by the Web Server. Correct any incorrect Server MIME types. (related article)
Stylesheet is not being recognized The presence of the title attribute in a link element that references an external stylesheet can cause the stylesheet may be causing the external stylesheet to be ignored.
  • Make sure that any stylesheet which should always be applied is persistent instead of preferred. (related article)
Connecting to a secure site fails, but connects in Internet Explorer The Web Server does not properly implement the fall back negotiation for SSL.
  • The Web Server administrator needs to upgrade 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.
DHTML Menus implemented using HierMenu have problems 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 popups in the wrong position. The most recent versions of HierMenu fully support all Gecko-based browsers.
  • Upgrade to the most recent version of HierMenu

Common Coding and Server Problems

This section details solutions to the most common problems affecting standards-based browsers as well as issues that may specifically affect Gecko browsers.

Proprietary HTML

Problem: Using Browser-Specific Proprietary HTML Markup (such as <tt><LAYER></tt>).

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.

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

The prime example of this is the use of Netscape Navigator 4 proprietary <tt><LAYER></tt>, commonly used in site navigation. For standards-based alternatives, see Updating DHTML Web Pages for Next Generation Browsers.

An HTML page can be quickly checked for the use of proprietary HTML Markup by submitting the page to the W3's HTML Validator 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.

The HTML Element Cross Reference provides a list of all HTML Elements supported in Netscape 4, Gecko browsers, Internet Explorer 4 and up and can be used to determine which HTML Elements are supported by all browsers.

Browser Detection

Problem: Faulty Browser Detection or Sniffing

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.

Many problems can occur when a web page uses browser detection to determine which proprietary features to use for a particular browser.

Please see the Browser Detection and Cross Browser Support article for a better approach to detecting browsers.

Browser-specific Workarounds

Problem: Code includes workarounds for bugs and browser-specific quirks.

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.

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

Example - Putting forms in Tables

Invalid HTML to eliminate line break in <tt><FORM></tt>.

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

<table border="1">
 <tr>
  <form name="form2">
   <td>
    <input type="text">
   </td>
  </form>
 </tr>
<table>

This approach is commonly used to get around the fact that <tt><FORM></tt> 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.

Incorrect Use of XML Empty Tag notation

Many authors have taken to using XML Empty tag notation (<tt><tag /></tt>) in their HTML files. In XML, an Empty tag never has any content. The XHTML backward compatibility guidelines state that Empty Elements can be coded by following the tag name with a space followed with as slash as in <tt><tag /></tt>. To be backwardly compatible you must have a space before the trailing <tt>/></tt>. 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.

For example, it is ok to code <tt><br></tt> as <tt><br /></tt> although there is no benefit to do so in HTML documents. But it is not OK to code <tt><option></tt> as <tt><option /></tt>. To understand why, consider the following:

HTML without optional ending tagsEquivalent HTML with optional ending tags
<select>
<option>OptionValue
</select>
<select>
<option>OptionValue</option>
</select>

Now consider if we used the XML Empty tag notation: the <tt><option /></tt>.

HTML with XML Empty Tag notation Equivalent HTML with ending tags
<select>
<option />OptionValue
</select>
<select>
<option></option>OptionValue
</select>

This is simply not correct. If you must use the XML Empty tag notation, then only do so for HTML Elements that never have any content - not for HTML Elements that have optional ending tags.

CSS ID's should be case-sensitive

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.

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

-(EXAMPLE REMOVED)-

Note that the W3C's HTML Validator 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 HTML Validator is one of the primary vehicles web developers have for learning about the standards.

Due to the common nature of this error, Netscape 6.2 began treating CSS ID attributes as case-insensitive in Quirks mode only. If you are invoking Standards mode, you should still code your CSS to be consistent with respect to case.

CSS Class names should be case-sensitive
<style type="text/css">
  .class1 { font-size: 1em; }
  .CLASS1 { font-size: 2em; }
</style>
<div>
<div class="class1">
  should be font-size: 1em;
</div>
<div class="CLASS1">
  should be font-size: 2em;
</div>

-(EXAMPLE REMOVED)-

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.

Due to the common nature of this error by web authors, Netscape 6.2 began treating CSS Class attributes as case-insensitive in Quirks mode only. If you are invoking Standards mode, you should still code your CSS to be consistent with respect to case.

Incorrect Relative URLs

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 <tt>path/file.html</tt>. Relative URLs that refer to a path relative to the web server's root directory look like <tt>/path/file.html</tt>.

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

Invalid use of spaces in name Attributes (such as image maps)

Many authors seem to be infected by a penchant to use spaces in names. A name or id 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 name attributes are coded using valid characters only.

Bad Code Due to Old APIS and Tools

Problem: Obsolete APIs or web authoring tools generate non-standard code.

Many older versions of cross-browser APIs in common use around the web such as DYNAPI do not support 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.

Newer versions of these APIs and tools do support Gecko however. For example, DYNAPI is now maintained at SourceForge and offers a Gecko-compatible version. Newer versions of web authoring tools support Gecko.

Wrong DOCTYPE

Problem: An incorrect DOCTYPE can completely alter a page's presentation.

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.

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. (related article)

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.x and Netscape 7.x if an inappropriate layout mode is specified.

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 Chapter 10 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.

Invalid Comments

Gecko also has three parsing modes: Quirks, Almost Standards, and Standards. Quirks mode allows the use of invalid comments containing two dashes -- while Standards and Almost Standards modes do not.

<!---- This is an invalid HTML Comment accepted in Quirks Comment Parsing ---->
<!-- This is a valid HTML Comment accepted in Stricts Comment Parsing -->

For the exact rules on which DOCTYPEs invoke Quirks vs. Standards mode see Mozilla's DOCTYPE sniffing article.

Codage de plugins

Vous pourrez remarquer que certain plugins ne se comportent pas de la même façon dans Gecko et dans Netscape Navigator 4. Visitez la page Plugins pour plus d'informations à propos des langages de script dans les navigateurs Gecko, la bonne utilisation des balises, les changements dans l'architecture des plugins par rapport à la génération Netscape 4, et les suggestions sur l'utilisation des plugins.

Problèmes de configuration du serveur Web

Types MIME spécifiés incorrects

Beaucoup de serveurs Web déclarent incorrectement les types MIME des fichiers. Les navigateurs Gecko requièrent qu'ils soient correctement définis pour correspondre aux différents types de contenus :

  • HTML - text/html
  • CSS - text/css (related article)
  • XML - text/xml
  • SVG - image/svg+xml

Mauvaise implémentations de HTTP

Plusieurs serveurs Web implémentent de façon incorrecte le protocole HTTP ce qui peut provoquer quelques problèmes pour Netscape 6.

Mauvaise implémentations de SSL

Les vieux navigateurs tels que Internet Explorer 4 et Netscape Navigator 4 implémentent de vielles versions du protocole SSL. De nos jours, la version la plus couramment déployée est SSL 3.0, cependant, la dernière version de TLS (SSL 3.1), intégrée aux navigateurs Gecko, n'est supportée que par très peu de serveurs Web. Malheureusement, plusieurs implémentations de SSL 3.0 implémentent de manière incorrecte la négociation du protocole SSL à utiliser et échouent lors de la connexion avec les navigateurs Gecko.

Pour plus d'informations à propos de ces problèmes, veuillez lire Notes on TLS - SSL 3.0 Intolerant Servers.

Useful Resources

References

Original Document Information

  • Last Updated Date: August 16th, 2002
  • Copyright © 2001-2003 Netscape. All rights reserved.

Interwiki Languages Links

{{ wiki.languages( { "en": "en/Gecko_Compatibility_Handbook" } ) }}

Source de la révision

<p>
{{template.Traduction_en_cours("Gecko Compatibility Handbook")}}
L'objectif de ce manuel est de vous aider à mettre à jour vos sites Web pour qu'ils s'affichent correctement dans les navigateurs respectants les standards du Web et pour détecter correctement <a href="fr/Gecko">Gecko</a>.
</p><p>Si vous ne connaissez pas les standards du Web, vous devriez consulter <a class="external" href="http://www.mozilla.org/docs/web-developer/upgrade_2.html">Using Web Standards in Your Web Pages</a>.
</p><p>Gecko est un navigateur Web embarquable, développé comme composante du projet open source <a class="external" href="http://www.mozilla.org/">Mozilla</a>. Il est basé sur les <a class="external" href="http://www.w3.org/">Standards W3</a> plutôt que sur une approche propriétaire typique des solutions passées. Le respect des standards du Web simplifie la compatibilité inter-navigateurs lors du développement et permet de mettre en oeuvre des <a class="external" href="http://www.mozilla.org/access/">solutions d'accessibilité</a>.
</p>
<h3 name="4.x_contre_Gecko"> 4.x contre Gecko </h3>
<p>Depuis 1997, de nombreux sites internet ont été conçus pour fonctionner avec Microsoft Internet Explorer 4 ou Netscape Navigator 4. Ces navigateurs ont été développés avant que les recommandations du <a class="external" href="http://www.w3.org/">W3C</a> pour <a href="fr/HTML">HTML</a>, <a href="fr/CSS">CSS</a>, et le <a href="fr/DOM">DOM</a> n'existent.
</p><p>Plus récemment, les navigateurs ne respectant pas les standards du Web s'opposent à Gecko sur plusieurs points :
</p>
<ul><li> Ces navigateurs utilisent du code <a href="fr/HTML">HTML</a>, <a href="fr/CSS">CSS</a>, et <a href="fr/JavaScript">JavaScript</a> propriétaires (non standards).
</li><li> Internet Explorer 4 et Netscape Navigator 4 se partagent le support de la plupart des standards HTML 3.2 et du JavaScript de base.
</li><li> Alors qu'ils supportent à peu près le standard CSS 1, son implémentation n'est pas complète et comprend des fonctionnalités non standards supplémentaires.
</li><li> Ni Internet Explorer 4 ni Netscape Navigator 4 ne supporte le <a href="fr/DOM">DOM</a> du W3. À la place, chacun supporte sa propre API propriétaire de manipulation du contenu, du style et de la position des éléments HTML dans une page Web.
</li><li> De plus, Internet Explorer 4 et Netscape Navigator 4 utilisent des méthodes complètement différentes pour inclure des logiciels tiers dans leur navigateurs.
</li></ul>
<p>Gecko est un moteur de rendu multiplate-forme, compatible avec un grand nombre de versions de systèmes d'exploitation, dont Windows XP, Mac OS et Linux. De par la nature multiplate-forme de Gecko, ses fonctionnalités sont en général les mêmes entre les plates-formes, contrairement aux versions Mac et Windows d'Internet Explorer qui sont des programmes distincts qui se comportent de façons différentes.
</p>
<h3 name="Test_de_compatibilit.C3.A9_rapide"> Test de compatibilité rapide </h3>
<p>Si votre site utilise les technologies propriétaires de Netscape 4.x et de Microsoft, lisez l'article <a class="external" href="http://www.mozilla.org/docs/web-developer/upgrade_2.html">Using Web Standards in Your Web Pages</a> pour prendre rapidement connaissances des principes de bases des standards. Ce test de compatibilité sera d'autant plus bénéfique pour les sites utilisant un code simple ou ayant commencé une mise à jour pour supporter les standards.
</p>
<h4 name="Pr.C3.A9parer_les_navigateurs_.C3.A0_tester"> Préparer les navigateurs à tester </h4>
<p>Les nombreux navigateurs utilisant Gecko ne contiennent pas tous <tt>Netscape</tt> dans leur chaîne user-agent. Ainsi, il est important de vérifier que vous détectez correctement les navigateurs, tel que AOL pour Mac OS X.
</p><p>Vous pouvez <a class="external" href="http://www.mozilla.org/download.html">télécharger</a> un certain nombre de navigateurs. Ou, si vous utilisez la détection du user-agent, vous pouvez installer une extension pour Firefox ou Mozilla qui vous permettra de « simuler » les chaînes user-agent de ces navigateurs Gecko. Voici comment faire :
</p>
<ol><li> Lancez <a class="external" href="http://www.mozilla.org/products/mozilla1.x/">Mozilla</a> ou <a class="external" href="http://www.getfirefox.com/">Firefox</a>. L'avantage d'utiliser ces navigateurs est qu'en détectant uniquement les chaînes <tt>Netscape</tt> ou <tt>Netscape6</tt> vous obtiendrez <b>the issues right away</b>.
</li><li> Installez l'extension <a class="external" href="https://addons.mozilla.org/extensions/moreinfo.php?id=59">User Agent Switcher</a>.
</li><li> Après le redémarrage de vitre navigateur, ajoutez les <a href="fr/Les_cha%c3%aenes_UserAgent_de_Gecko">chaînes User-Agent</a> pour lesquelles vous désirez tester la détection (<tt>Outils | User Agent Switcher | Options | Options… | User Agents | Ajouter…</tt>). Une fois la boîte de dialogue renseignée (Cela devrait ressembler à la capture ci-dessous), cliquez sur « OK » et fermer la fenêtre « Options ».<br><br><img alt="Image:GeckoCompatibilityHandbook-Configure-UASwitcher.PNG" src="File:fr/Media_Gallery/GeckoCompatibilityHandbook-Configure-UASwitcher.PNG">
</li><li> Vous pouvez maintenant commencer à utiliser la chaîne User-Agent que vous venez de créer en cliquant sur <tt>Outils | User Agent Switcher | <i>Le nom que vous avez utilisé</i></tt>. Vous pouvez vérifier que la chaîne à changée en regardant dans <tt>Aide | À propos</tt>.
</li></ol>
<p>Vous pourrez trouver <a href="fr/Les_cha%c3%aenes_UserAgent_de_Gecko">les chaînes User Agent</a> des navigateurs Gecko <a href="fr/Les_cha%c3%aenes_UserAgent_de_Gecko">sur cette page</a>. Si possible, téléchargez également les différents clients (<a class="external" href="http://www.netscape.com/">Netscape</a>, <a class="external" href="http://www.aol.com">AOL</a>, <a class="external" href="http://www.compuserve.com/">CompuServe</a>) pour les tester.
</p>
<h4 name="Examiner_vos_r.C3.A9sultats"> Examiner vos résultats </h4>
<p>Tous les scénarii suivants sont en rapport avec la détection du navigateur. Pour des solutions concernant les problèmes courant veuillez lire la suite de ce manuel.
</p>
<h5 name="Probl.C3.A8me_:_Le_site_respecte_les_standards_Web_mais_ne_s.27affiche_pas_correctement"> Problème : Le site respecte les standards Web mais ne s'affiche pas correctement </h5>
<p>Essayez d'utiliser la chaîne User Agent de Internet Explorer 6. Si cela fonctionne, paramétrez la détection pour fournir le contenu IE 6 aux visiteurs dont les chaînes User Agent contiennent <tt>Gecko</tt>. IE 6.x est à ce jour, plus proche des navigateurs Gecko que ne l'est Netscape 4.x, de fait d'un support plus récent des standards du W3C.
</p>
<h5 name="Probl.C3.A8me_:_Le_site_certifi.C3.A9_Netscape_6.x_s.27affiche_incorrectement_dans_les_autres_navigateurs"> Problème : Le site certifié Netscape 6.x s'affiche incorrectement dans les autres navigateurs </h5>
<p>Si votre site est déj) compatible avec Gecko, essayez de revenir à une chaîne User Agent de Netscape 6. If it looks OK, you're probably detecting only <tt>Netscape</tt> or <tt>Netscape6</tt>. Detecting <tt>Gecko</tt> instead is the easy way to fix this as well as accomodate users of Mozilla, CompuServe 7, etc. (<a href="fr/Browser_Detection_and_Cross_Browser_Support">Related article</a>)
</p>
<h5 name="Probl.C3.A8me_:_Le_site_pose_probl.C3.A8me_dans_tous_les_navigateurs_Gecko"> Problème : Le site pose problème dans tous les navigateurs Gecko </h5>
<p>If you are still seeing problems, take a look at the troubleshooting section of this handbook. Also if you're using Netscape 4.x and Microsoft proprietary technologies, see <a class="external" href="http://www.mozilla.org/docs/web-developer/upgrade_2.html">Using Web Standards in Your Web Pages</a> for a quick tutorial on what's different in Gecko.
</p>
<h3 name="AOL_or_CompuServe_Problems"> AOL or CompuServe Problems </h3>
<p>Even if your site works on Netscape 7.x, it is important to test your site in <a class="external" href="http://www.aol.com/">AOL for Mac OS X</a> and <a class="external" href="http://www.compuserve.com/">CompuServe 7</a> to check for <a href="fr/Browser_Detection_and_Cross_Browser_Support">browser detection</a> and network issues.
</p>
<h4 name="Testing_AOL_From_Within_a_Firewall"> Testing AOL From Within a Firewall </h4>
<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. See <a class="external" href="http://webmaster.aol.com/">Webmaster@AOL</a> for further information.
</p>
<h3 name="Solution_Quick_Reference"> Solution Quick Reference </h3>
<p>As discussed in Mozilla's <a class="external" href="http://www.mozilla.org/docs/web-developer/upgrade_2.html">Using Web Standards in Your Web Pages</a>, coding for cross-browser compatibility requires you write standard markup that Gecko-based browsers, Netscape 4, and IE browsers can render properly.
</p>
<table class="standard-table" width="100%">

<tbody><tr>
<th> Symptom </th><th> Possible Problem </th><th> Solution
</th></tr>
<tr>
<td width="25%">Site works correctly in Netscape 6.x but not Netscape 7.x or other browsers based upon Gecko.
</td><td width="37.5%">The browser detection JavaScript detects Netscape 6.x but does not detect other Gecko-based browsers.
</td><td width="37.5%">
<ul><li> Upgrade the browser detection JavaScript to detect "Gecko." (<a href="fr/Browser_Detection_and_Cross_Browser_Support">related article</a>)
</li></ul>
</td></tr>
<tr>
<td>Content differs in Gecko browsers and Internet Explorer
</td><td>Use of proprietary or invalid markup (such as is generated by some Microsoft Office applications).</td><td>
<ul><li>Use the W3 HTML and CSS Validator <a href="fr/Tools">Tools</a> to validate the web page. Correct any errors and replace proprietary code wherever possible.
</li><li>Upgrade web authoring tool to versions that support the W3 standards and Gecko browsers
</li></ul>
</td></tr>
<tr>
<td>Content differs in Gecko browsers and Internet Explorer
</td><td>The JavaScript Console in Netscape 6.x and Netscape 7.x displays errors about document.all, document.layers, document.&lt;property&gt; not being defined because of an incorrect browser sniffing, or use of proprietary JavaScript.</td><td>
<ul><li>Update <a href="fr/Browser_Detection_and_Cross_Browser_Support">browser sniffing</a> to correctly detect Gecko browsers.
</li><li>Upgrade APIs to use newer standards-conformant versions
</li><li>Upgrade web authoring tool to versions that support the W3 standards and Gecko browsers
</li></ul>
</td></tr>
<tr>
<td>Content differs in Gecko browsers and Internet Explorer
</td><td>
<ul><li>Your CSS relies on bugs in Internet Explorer's implementation of CSS.
</li><li>Internet Explorer incorrectly treats ID's and CLASS names as case insensitive while Gecko treats them correctly as case sensitive. Inconsistent case between the CSS defining the style for HTML ID's and CLASSes results in Gecko browsers not applying the styles to ID's or CLASS names that differ in case.
</li><li>Internet Explorer incorrectly specifies height and width of inline elements such as SPAN.
</li><li>Internet Explorer implements the box model (padding, margins, borders) incorrectly.
</li></ul>
</td><td>
<ul><li>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="fr/CSS">more about CSS</a>)
</li></ul>
</td></tr>
<tr>
<td>Content differs in Gecko browsers and Internet Explorer
</td><td>Incorrect Layout mode specified by DOCTYPE.</td><td>
<ul><li>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 <a href="fr/Mozilla's_DOCTYPE_sniffing">DOCTYPE</a>.
</li></ul>
</td></tr>
<tr>
<td>Images are laid out without intervening blank areas in Interent Explorer but display blank areas between the images in Gecko browsers.
</td><td>Incorrect Layout mode specified by DOCTYPE.</td><td>
<ul><li>Standards Mode Layout has been specified by the DOCTYPE. Change the DOCTYPE to request Quirks mode layout instead. <a href="fr/Images%2c_Tables%2c_and_Mysterious_Gaps">more info</a>
</li></ul>
</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>
<ul><li>Change relative URLs from http://directory/... to directory/.... or use absolute paths in URLs such as http://example.com/directory/...
</li><li>Verify that all hyperlinks use forward slashes (/)
</li></ul>
</td></tr>
<tr>
<td>Clicking on a link displays a "download" or displays HTML code instead of rendering the page correctly, 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 Gecko browsers relies upon the Web Server to specify the correct MIME type. 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>
<ul><li>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="fr/Incorrect_MIME_Type_for_CSS_Files">related article</a>)
</li></ul>
</td></tr>
<tr>
<td>Stylesheet is not being recognized
</td><td>The presence of the title attribute in a link element that references an external stylesheet can cause the stylesheet may be causing the external stylesheet to be ignored.</td><td>
<ul><li>Make sure that any stylesheet which should always be applied is persistent instead of preferred. (<a href="fr/Correctly_Using_Titles_With_External_Stylesheets">related article</a>)
</li></ul>
</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>
<ul><li>The Web Server administrator needs to upgrade 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.
</li></ul>
</td></tr>
<tr>
<td>DHTML Menus implemented using HierMenu have problems
</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 class="external" href="http://www.webreference.com/dhtml/hiermenus/">HierMenu</a> fully support all Gecko-based browsers.</td><td>
<ul><li>Upgrade to the most recent version of <a class="external" href="http://www.webreference.com/dhtml/hiermenus/">HierMenu</a>
</li></ul>
</td></tr></tbody></table>
<h3 name="Common_Coding_and_Server_Problems"> Common Coding and Server Problems </h3>
<p>This section details solutions to the most common problems affecting standards-based browsers as well as issues that may specifically affect Gecko browsers.
</p>
<h4 name="Proprietary_HTML"> Proprietary HTML </h4>
<p><b>Problem: Using Browser-Specific Proprietary HTML Markup (such as <tt>&lt;LAYER&gt;</tt>).</b>
</p><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>Gecko browsers will ignore both Internet Explorer and Netscape Navigator 4 proprietary HTML tags. So, a page may not display in 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 <tt>&lt;LAYER&gt;</tt>, commonly used in site navigation. For standards-based alternatives, see <a href="fr/Updating_DHTML_Web_Pages_for_Next_Generation_Browsers">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 class="external" 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="fr/HTML_Element_Cross_Reference">HTML Element Cross Reference</a> provides a list of all HTML Elements supported in Netscape 4, Gecko browsers, Internet Explorer 4 and up and can be used to determine which HTML Elements are supported by all browsers.
</p>
<h4 name="Browser_Detection"> Browser Detection </h4>
<p><b> Problem: Faulty Browser Detection or Sniffing </b>
</p><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.
</p><p>Many problems can occur when a web page uses browser detection to determine which proprietary features to use for a particular browser.
</p><p>Please see the <a href="fr/Browser_Detection_and_Cross_Browser_Support">Browser Detection and Cross Browser Support</a> article for a better approach to detecting browsers.
</p>
<h4 name="Browser-specific_Workarounds"> Browser-specific Workarounds </h4>
<p><b> Problem: Code includes workarounds for bugs and browser-specific quirks. </b>
</p><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 Gecko browsers since it implements the standards strictly. The old "code to the bugs" approach will not work for Netscape 6.x, Netscape 7.x and other Mozilla based browsers.
</p>
<h5 name="Example_-_Putting_forms_in_Tables"> Example - Putting forms in Tables </h5>
<p><b>Invalid HTML</b> to eliminate line break in <tt>&lt;FORM&gt;</tt>.
</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 <tt>&lt;FORM&gt;</tt> 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>
<h5 name="Incorrect_Use_of_XML_Empty_Tag_notation"> Incorrect Use of XML Empty Tag notation </h5>
<p>Many authors have taken to using XML Empty tag notation (<tt>&lt;tag /&gt;</tt>) in their HTML files. In XML, an Empty tag <b>never</b> has any content. The XHTML backward compatibility guidelines state that <b>Empty</b> Elements can be coded by following the tag name with a space followed with as slash as in <tt>&lt;tag /&gt;</tt>. To be backwardly compatible you <b>must</b> have a space before the trailing <tt>/&gt;</tt>. 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 <tt>&lt;br&gt;</tt> as <tt>&lt;br /&gt;</tt> although there is no benefit to do so in HTML documents. But it is <b>not</b> OK to code <tt>&lt;option&gt;</tt> as <tt>&lt;option /&gt;</tt>. To understand why, consider the following:
</p>
<table class="standard-table">

<tbody><tr>
<th>HTML without optional ending tags</th><th>Equivalent HTML with optional ending tags
</th></tr>
<tr>
<td width="50%"><pre>&lt;select&gt;
&lt;option&gt;OptionValue
&lt;/select&gt;</pre>
</td><td width="50%"><pre>&lt;select&gt;
&lt;option&gt;OptionValue&lt;/option&gt;
&lt;/select&gt;</pre>
</td></tr>
</tbody></table>
<p>Now consider if we used the XML Empty tag notation: the <tt>&lt;option /&gt;</tt>.
</p>
<table class="standard-table">

<tbody><tr>
<th> HTML with XML Empty Tag notation </th><th> Equivalent HTML with ending tags
</th></tr>
<tr>
<td width="50%"><pre>&lt;select&gt;
&lt;option /&gt;OptionValue
&lt;/select&gt;</pre>
</td><td width="50%">
<pre>&lt;select&gt;
&lt;option&gt;&lt;/option&gt;OptionValue
&lt;/select&gt;</pre>
</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 never have any content - <b>not</b> for HTML Elements that have optional ending tags.
</p>
<h5 name="CSS_ID.27s_should_be_case-sensitive"> CSS ID's should be case-sensitive </h5>
<p>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>
<p>-(EXAMPLE REMOVED)-
</p><p>Note that the <a class="external" href="http://validator.w3.org/">W3C's 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 class="external" 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 <b>Quirks mode only</b>. If you are invoking Standards mode, you should still code your CSS to be consistent with respect to case.
</p>
<h5 name="CSS_Class_names_should_be_case-sensitive"> CSS Class names should be case-sensitive </h5>
<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>
<p>-(EXAMPLE REMOVED)-
</p><p>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 <b>Quirks mode only</b>. If you are invoking Standards mode, you should still code your CSS to be consistent with respect to case.
</p>
<h5 name="Incorrect_Relative_URLs"> Incorrect Relative URLs </h5>
<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 <tt>path/file.html</tt>. Relative URLs that refer to a path relative to the web server's root directory look like <tt>/path/file.html</tt>.
</p><p>Older browsers supported the invalid use of <tt><span class="plain">http://path/</span></tt> for URLs relative to a web server's root directory but Gecko browsers do not. To correctly specify a web page relative to a web server's root directory, use URLs of the form <tt>/path/file.html</tt>.
</p>
<h5 name="Invalid_use_of_spaces_in_name_Attributes_.28such_as_image_maps.29"> Invalid use of spaces in name Attributes (such as image maps) </h5>
<p>Many authors seem to be infected by a penchant to use spaces in names. A <a class="external" 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 name attributes are coded using valid characters only.
</p>
<h4 name="Bad_Code_Due_to_Old_APIS_and_Tools"> Bad Code Due to Old APIS and Tools</h4>
<p><b>Problem: Obsolete APIs or web authoring tools generate non-standard code.</b>
</p><p>Many older versions of cross-browser APIs in common use around the web such as <a class="external" href="http://dynapi.sourceforge.net/">DYNAPI</a> do not support 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 Gecko however. For example, <a class="external" href="http://dynapi.sourceforge.net/">DYNAPI</a> is now maintained at SourceForge and offers a Gecko-compatible version. Newer versions of <a href="fr/Standards-Compliant_Authoring_Tools">web authoring tools</a> support Gecko.
</p>
<h4 name="Wrong_DOCTYPE"> Wrong DOCTYPE </h4>
<p><b> Problem: An incorrect DOCTYPE can completely alter a page's presentation. </b>
</p><p>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="fr/Liberty!_Equality!_Validity!">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.x and Netscape 7.x if an inappropriate layout mode is specified.
</p><p>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 class="external" 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>
<h4 name="Invalid_Comments"> Invalid Comments </h4>
<p>Gecko also has three parsing modes: Quirks, <a href="fr/Gecko's_Almost_Standards_Mode">Almost Standards</a>, and Standards. Quirks mode allows the use of invalid comments containing two dashes -- while Standards and Almost Standards modes do not.
</p>
<pre>&lt;!---- This is an invalid HTML Comment accepted in Quirks Comment Parsing ----&gt;
&lt;!-- This is a valid HTML Comment accepted in Stricts Comment Parsing --&gt;</pre>
<p>For the exact rules on which DOCTYPEs invoke Quirks vs. Standards mode see <a href="fr/Mozilla's_DOCTYPE_sniffing">Mozilla's DOCTYPE sniffing</a> article.
</p>
<h3 name="Codage_de_plugins"> Codage de plugins </h3>
<p>Vous pourrez remarquer que certain plugins ne se comportent pas de la même façon dans Gecko et dans Netscape Navigator 4. Visitez la page <a href="fr/Plugins">Plugins</a> pour plus d'informations à propos des langages de script dans les navigateurs Gecko, la bonne utilisation des balises, les changements dans l'architecture des plugins par rapport à la génération Netscape 4, et les suggestions sur l'utilisation des plugins.
</p>
<h3 name="Probl.C3.A8mes_de_configuration_du_serveur_Web"> Problèmes de configuration du serveur Web </h3>
<h4 name="Types_MIME_sp.C3.A9cifi.C3.A9s_incorrects">Types MIME spécifiés incorrects</h4>
<p>Beaucoup de serveurs Web déclarent incorrectement les types MIME des fichiers. Les navigateurs Gecko requièrent qu'ils soient correctement définis pour correspondre aux différents types de contenus :
</p>
<ul><li> HTML - text/html
</li><li> CSS - text/css (<a href="fr/Incorrect_MIME_Type_for_CSS_Files">related article</a>)
</li><li> XML - text/xml
</li><li> SVG - image/svg+xml
</li></ul>
<h4 name="Mauvaise_impl.C3.A9mentations_de_HTTP">Mauvaise implémentations de HTTP</h4>
<p>Plusieurs serveurs Web implémentent de façon incorrecte le protocole HTTP ce qui peut provoquer quelques problèmes pour  Netscape 6.
</p>
<h4 name="Mauvaise_impl.C3.A9mentations_de_SSL">Mauvaise implémentations de SSL</h4>
<p>Les vieux navigateurs tels que Internet Explorer 4 et Netscape Navigator 4 implémentent de vielles versions du <a href="fr/Introduction_%c3%a0_SSL">protocole SSL</a>. De nos jours, la version la plus couramment déployée est SSL 3.0, cependant, la dernière version de TLS (SSL 3.1), intégrée aux navigateurs Gecko, n'est supportée que par très peu de serveurs Web. Malheureusement, plusieurs implémentations de SSL 3.0 implémentent de manière incorrecte la négociation du protocole SSL à utiliser et échouent lors de la connexion avec les navigateurs Gecko.
</p><p>Pour plus d'informations à propos de ces problèmes, veuillez lire <a href="fr/Notes_on_TLS_-_SSL_3.0_Intolerant_Servers">Notes on TLS - SSL 3.0 Intolerant Servers</a>.
</p>
<h3 name="Useful_Resources"> Useful Resources </h3>
<ul><li> Beginning to intermediate Web Authors can look to the DevEdge Web Tune Up Wizard for pointers on areas where content needs to be updated to support Gecko and other browsers that support the W3C standards.
</li><li> <a class="external" href="http://webmaster.info.aol.com/">AOL Webmaster.info Site - Developing for Netscape Gecko</a> covers common issues facing webmasters, and how to update your code.
</li><li> The <a href="fr/Tools">toolbox</a> aggregates several invaluable W3C tools for diagnosing web page problems as well as validators, code samples, and more.
</li><li> <a class="external" href="http://bugzilla.mozilla.org/enter_bug.cgi?format=guided">Report Mozilla browser bugs or web site compatibility problems</a>
</li><li> <a href="fr/Mozilla_Web_Developer_Community">Mozilla Web Developer Community</a>
</li></ul>
<h3 name="References"> References </h3>
<ul><li> <a class="external" href="http://www.mozilla.org/docs/web-developer/upgrade_2.html">Using Web Standards in Your Web Pages</a>
</li><li> {{mediawiki.interwiki('en', 'Browser_Detection_and_Cross_Browser_Support', 'en:Browser Detection and Cross Browser Support')}}
</li><li> {{mediawiki.interwiki('en', 'Updating_DHTML_Web_Pages', 'en:Updating DHTML Web Pages')}}
</li><li> {{mediawiki.interwiki('en', 'HTML_Element_Cross_Reference', 'en:HTML Element Cross Reference')}}
</li><li> {{mediawiki.interwiki('en', 'DOM_Client_Object_Cross-Reference', 'en:DOM Client Object Cross-Reference')}}
</li><li> <a class="external" href="http://www.mozilla.org/docs/web-developer/xbdhtml/xbdhtml.html">Introduction to Cross-Browser JavaScript and Dynamic HTML</a>
</li><li> <a href="fr/Les_cha%c3%aenes_UserAgent_de_Gecko">Les chaînes UserAgent de Gecko</a>
</li><li> {{mediawiki.interwiki('en', 'Tools', 'Developer Tools')}}
</li><li> <a href="fr/Le_sniffing_de_DOCTYPE_dans_Mozilla">Le sniffing de DOCTYPE dans Mozilla</a>
</li><li> The <a href="fr">page d'accueil</a> links to many more resources.
</li></ul>
<div class="originaldocinfo">
<h3 name="Original_Document_Information"> Original Document Information </h3>
<ul><li> Last Updated Date: August 16th, 2002
</li><li> Copyright © 2001-2003 Netscape. All rights reserved.
</li></ul>
</div>
<p><span class="comment">Interwiki Languages Links</span>
</p>{{ wiki.languages( { "en": "en/Gecko_Compatibility_Handbook" } ) }}
Revenir à cette révision