-
-

Menu
Home
-
ASCII Character Set
-
Beatles Programmers Album
-
Change UNIX Password
-
Color Tester
-
Free CGI Scripts
-
HTML Tag List
-
Internet Explorer Bug
-
ISO-Latin-1 Character Set
-
Links
-
Managing Shell Utilities
-
Netscapes Bad Rap
-
PDF Maker
-
Please Your I.T. Dept
-
RGB to HEX Converter
-
Server-Side Includes
-
Technical Books
-
UNIX man Pages
-

-
Scott Crevier's Webmaster Resources
Why Netscape Gets A Bad Rap

Netscape Navigator is my browser of choice. It is the browser that all web site developers should use.

First of all, when you view the source of any web page, Internet Explorer simply opens up Notepad. Navigator has its own source viewer with HTML syntax highlighting. This alone has helped me find many simple HTML coding errors.

But the main reason that I use Navigator is because it complies to published HTML standards better than Internet Explorer. There are many common errors that you can make, and Navigator won't let you get away with them; but Internet Explorer will. Internet Explorer seems to say "I know what you meant, so I'm gonna help you out and display it right". While that might seem like a nice thing to do, it gives you a false sense that everything is okay.

So, if you have a web page with one of these common coding errors, and you view it in Internet Explorer, it will look fine. But in Navigator it won't. And when this happens, many web geeks will say "Netscape sucks", just because their page looks better in Internet Explorer. But what you need to realize is that when this happens, Navigator is correctly interpreting your code, and since it has errors, your page does not look right. On the other hand, Internet Explorer is wrongly compensating for your error and displaying what it thinks you meant; and as I said above, it is giving you a false sense that everything is okay. That's not good.

If your web page contains HTML coding errors, it should not display correctly.

Now, I don't expect you to just believe me. Hopefully you can follow along and try the following two examples. To do so, you'll need to be able to create a very simple HTML file, and you'll need to view that page in both Netscape Navigator and Internet Explorer.

Example #1:

HTML standards say that to display a table on your web page, you must start the table with the <table> tag, and you must end it with the </table> tag. So, let's create a table. To save you a little time, I've provided the following code for a simple table that you can just copy and paste into your HTML file:

<table border=1 cellpadding=2 cellspacing=0>
<tr> <th>City</th> <th>Team</th> <th>Sport</th> </tr>
<tr> <td>Green Bay</td> <td>Packers</td> <td>football</td> </tr>
<tr> <td>Anaheim</td> <td>Angels</td> <td>baseball</td> </tr>
<tr> <td>Los Angeles</td> <td>Lakers</td> <td>basketball</td> </tr>
</table>

After you create your HTML page with the above table, view it in both browsers. Everything will look fine. Now, remove the </table> tag from the end of the table, and refresh the page in both browsers. You will see that the table still displays okay in Internet Explorer. This is WRONG. The table should not display! Navigator handles it correctly by not displaying the table at all.

Example #2:

HTML standards provide for a concept known as URL encoding. Simply put, this helps you handle situations when you have to link to files with certain characters in their filenames. Let's get right to the example:

Create a small image file and name it sample_image.gif. Create an HTML page that displays this image. Simple enough, eh? Here is a sample tag that you can copy and paste:

<img src="sample_image.gif" width=100 height=80 border=1 alt="sample">

As long as you have set it up properly, the image will display fine in both browsers. Now, change the image filename so that there is a space instead of the underscore. So the new filename will be sample image.gif. And change your HTML file accordingly.

Here is what your new img tag might look like:

<img src="sample image.gif" width=80 height=80 border=1 alt="sample">

If you now view the image in both browsers, it will not display in Navigator. Why? Because the above syntax is not legal. The image should not display in Internet Explorer either, but it does.

The space character is one of those special characters that has to be encoded to its hex equivalent (which happens to be %20). So, if your image has a space in the filename, your img tag should look like this:

<img src="sample%20image.gif" width=80 height=80 border=1 alt="sample">

Using the above tag, your image will display fine in both browsers.

So, the next time your page looks real nice in Internet Explorer, but it's screwed up in Netscape Navigator, you'll know that Navigator is doing it right. And Internet Explorer is pulling the wool over your eyes.

This is also a good lesson to make sure you always view your web pages in both browsers. This is the only way to make sure it's setup properly.



-
smcNet Copyright © 1997-2024 Scott Crevier
www.webmaster.crevier.org
De Pere, Wisconsin, USA
Powered by Perl