spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / javascript / netscape6 113456
[previous] [next]

ASP 3.0/.NET Developer
Jupitermedia
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Search
The Business Internet

Developer News
SaaS Tool Offers Custom Database Development
Microsoft’s Automated Agent: Can We Talk?
Borland Finally Sells CodeGear

Standards ... or be careful what you ask for

Thanks in part to the tireless efforts of Zeldman and Co. (Webstandards.org) and to pressure from thousands of developers like you, NS6, IE5.5, and Opera 5 are now the most standards-based, DOM-compliant browsers available. Someday these efforts will pay off for a code-once future (some are already there and challenging others to follow), but for production and educational sites like ours, you need to code for the widest possible audience. That means supporting both legacy and modern browsers.

HTML and CSS

Browser developers have a problem. They need to support Web pages written for previous generations of browsers that are not standards-compliant while at the same time supporting the newer standards-compliant browsers. How is a modern browser supposed to support pages written for earlier buggy non-conformant browsers while at the same time supporting fully standards-compliant HTML, CSS and JavaScript? On the other hand, how can Web developers write pages that will display as expected on both older and newer browsers?

Older browsers have been very forgiving in terms of dealing with invalid HTML. They've "fixed" your bad markup in ways that you've become used to. Many Web developers have become dependent upon this non-standard fixup performed by the older browsers and don't know how to write valid HTML. The result is what some call "tag soup." Browsers that are standards-compliant depend upon valid markup in order to apply the complex rules of CSS. There is no reliable way for a browser to apply standard layout rules to invalid HTML. You've got to learn to write valid HTML if you're going to support modern browsers. The only other choice is to live in the proprietary world of the 4.x browsers. And that's a Bad Thing (tm).

NS6 relies upon properly nested HTML tags as well as their proper closure.

SGML Document Type Declarations (DOCTYPEs)

The Document Type Declaration or DOCTYPE is an SGML declaration that tells the browser which version of HTML the page is using. Inside the DOCTYPE tag is a Document Type Definition (DTD) that defines what version of HTML you're coding for, and the syntactic rules to follow.

DOCTYPEs

DOCTYPE tags in HTML signify which standard the HTML follows, if any. In the past, DOCTYPEs have not been that meaningful and many Web page authors and authoring tools use DOCTYPEs that do not match the actual HTML. Modern browsers such as NS6 and Internet Explorer 5 for the Mac sniff the DOCTYPE to determine whether an HTML page should be laid out according to the "Quirky" behavior of earlier browsers or if it should be laid out using the stricter modern standards.

It is very important that you use the appropriate DOCTYPE in order to tell the browser how you expect your page to be laid out. Here's a brief DOCTYPE usage guide.

DOCTYPE Mode Example Comment
No DOCTYPE Quirks    
Pre HTML 4.0 DOCTYPEs Quirks <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">  
HTML 4.x Transitional DOCTYPE without a URI Quirks <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">  
HTML 4.0 Transitional DOCTYPE with a URI Quirks in NS6, Standards in IE5/Mac <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
HTML 4.01 Transitional DOCTYPE with a URI Standards <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> use for documents that validate as HTML 4.01 Transitional that may contain deprecated HTML and that works with the CSS2 box model
HTML 4.x Strict DOCTYPE Standards <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> use for documents that validate as HTML 4.01 Strict and that works with the CSS2 box model

For more details on DOCTYPE and other related matters, see Henri Sivonen's fine explanations at Activating the Right Layout Mode in Mozilla and IE5 for Mac and Things to Take into Account When Moving to Standards-Compliant HTML and CSS Authoring.

JavaScript/ECMAScript

NS6 supports JavaScript version 1.5 that includes all of the features you're familiar with from JavaScript 1.2 plus some nice additions.

Javascript 1.5 provides support for the ECMA-262, revision 3 Standard (http://www.mozilla.org/js/language/E262-3.pdf) which adds features such as:

Other enhancements include:

More information can be found at "What is in JavaScript 1.5" at http://www.mozilla.org/js/js15.html.

DOM

NS6 supports to a great extent the DOM Level 1 and Level 2 standards. NS6 no longer supports the earlier Netscape Navigator 4.x proprietary DOM that included layers.

home / programming / javascript / netscape6 113456
[previous] [next]

Access FREE IBM Developer Tools:
Webcast:
Asset Reuse Strategies for Success--Innovate Don't Duplicate!
e-Kit:
Rational Build Forge Express
Download:
IBM Data Studio v1.1
e-Kit:
Rational Asset Manager



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
How to Create an Ajax Autocomplete Text Field: Part 6 · Software Engineering for Ajax · Perl Pragma Primer
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Using File Virtualization for Disaster Recovery · VoIP Security: SIP—Versatile but Vulnerable · Around the World in 80 Nodes


Created: February 15, 2001
Revised: Mar. 6, 2001


URL: http://webreference.com/programming/javascript/javascript/netscape6/