Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes IE and NN Compability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "IE and NN Compability" Watch "IE and NN Compability" New topic
Author

IE and NN Compability

Reilly Morris
Ranch Hand

Joined: Sep 11, 2001
Posts: 44
Last night I spent about 7 hours at work on JavaScript code, testing everything in IE and playing around learing core objects and their methods. I have now just viewed the fine piece of art in Netscape and wow... how can you possibly code JS to please both browers? Should I be working in an IDE of some sort which will code for both? I know they respond differently to HTML, but usually only modestly. Javascript looks so much better in IE, Does anyone have any suggestions?
Reilly

<b>Reilly</b> <br /><i>SCJP,J2EE,OOAD,iNet+,A+,CIW,<br />MCP,--</i>
SRINI VASAN
Ranch Hand

Joined: Aug 29, 2000
Posts: 48
Hi , I am very eager to know too.. Is there any tool guys .. Or Can some body put document on it .. I am just giving my collection ( I got it from a site ).

May be a bit log post guys .. can u all add to this list.

~~~~~~~~~~~~~~~~~ Difference in Netscape and IE~~~~~~~~~~~~~~~
When writing HTML codes, you have to be aware of the incompatibilities between Netscape and Internet Explorer. The appearance might have a dramatic difference depending on which browser you view it on. We will just cover a few of the tags out there which have different effects on the browsers.
Floating Frames < iframe > < /iframe >:
This tag allows you to place a frame of any size anywhere in your HTML layout just like an image. Floating frames are only compatible on Internet Explorer. When you try to view it on Netscape, the only message that appears on your browser is < iframe > < /iframe >

Multi-Column Text < multicol > </ multicol >:
To get the column styled paragraphs such as those in newspaper articles, you can use the Multi-Column Text tag. This tag lets you split your text into as many columns as desired. To do this, you place this set of tags around your text.
For example, < multicol cols="3" gutter="25" > Your text < /mulitcol >
 cols = number of columns
 gutter = space between column
This tag works on Netscape but not on Internet Explorer. Internet Explorer will just display the text, within the set of tags, on the screen without columns.
Marquees < marquee > < /marquee >:
This tag scrolls your text across the screen. The marquee tags are only compatible on Internet Explorer. Netscape will just ignore this tag and place the text within as plain text. Overuse of this feature will get readers annoyed. So, think before using it.


Spacer < spacer attribute1="..." attributes2="..." > < /spacer >
This feature allows you to create some white spaces within a line of text. Attribute such as type=block is only compatible on Netscape. Other attributes you can place inside this tag include align, height, size, type, and width. This tag can be used for horizontal or vertical spacing. It can also be used as a "tab" for starting a paragraph of text.
Color of Horizontal Rule < hr color=color > </hr>
This tag allows you to specify the color of the horizontal rule. This feature is only works on Internet Explorer. The color will not display on Netscape.
Table < table attribute1="..." attribute2="..." attribute3="..." > < /table >
Here are some table attributes that do not work on Netscape:
background=url
bordercolorlight=color
bordercolordark=color
frame=type
rules=edges
These attributes are only compatible with Internet Explorer, but not Netscape. Background lets you choose the background image to put in the table. Bordercolorlight allows you to specify the lighter color used in creating 3D borders independently. Bordercolordark allows you to specify the darker color used in creating 3D borders separately. Frame lets you specify which side of the table's outer border to be displayed. Rule specifies which inside borders to be shown.


Significant Features

Between the two browsers, Netscape Navigator and Internet Explorer, there are a few significant features in each of them. We would only mention a few of them here because as the companies constantly upgrade both browsers, there would be more differences later. If you know all these features already, then GREAT, you are certainly an explorer; but if you are not too familiar with the two browsers, these features are worth to know.
Bookmark:
We all like the Bookmark feature in Internet Explorer and Netscape Navigator. Using the Bookmark feature, we can avoid the trouble of typing in long website addresses, especially the ones we frequently visit. What would you do if you have a website address saved on Internet Explorer but you want to view that website on Netscape Navigator? The common way to do that would be open Internet Explorer, look up the website address in the Bookmark, open Netscape Navigator, type in the same address (or using copy and paste). It's kinda inconvenient huh? Well, the feature we are going to introduce here would definitely make this easier for your life. In Internet Explorer, you can import or export your saved bookmark from or to Netscape Navigator. However, this only can be done in Internet Explorer. To do that, you just choose "Import and Export" from the File menu in Internet Explorer (as shown below) then follow instruction.

Language Encoding:
For most people in the US, English is their first language. But when learning a foreign language one might want to visit a foreign website to test their understanding of the language, for example, Chinese, Japanese, Korean, etc. Even though you can find an application to download from the Internet to encode the language of the website, it's inconvenient and time consuming. Microsoft has been very thoughtful of this issue, and therefore developed a language encoding function in Internet Explorer to avoid the trouble of downloading and running of such applications. To do that, you can go to the View menu and select "Encoding" as shown below. It can encode more than 30 different languages!!!

Print Preview:
Well, don't uninstall your Netscape Navigator yet. There is one feature that Netscape Navigator is able to do but not Internet Explorer (yet). That's the feature of Print Preview. When we visit a website and decide that we want to keep a hard copy, we often choose to print it out. But how many pages are there going to be? Who knows? With the feature of the Print Preview in the Netscape Navigator, you would be able to tell and see the exact format as the website is in print. Therefore, you can always change your mind if you know that it doesn't look cool when the web page is in print. Don't forget this function next time when you decide to print something. Trust me, you can save a lot of paper and money from your Husky Card (personal experience!). Of course we will show you how it can be done:
You can certainly do a ONE-page preview........
Or a TWO-page preview!



CSS
When writing CSS stylesheets, you have to be aware of the incompatibilities between Netscape and Internet Explorer. Depending on which browser you view it on, the appearance may have dramatic difference . We will cover just a few of the CSS properties out there which have different effects on different browsers. To view a complete list of CSS incompatibilies in different browsers you can check out the Master Compatibility Chart by Eric Meyer.
Height Property
The height property in the CSS stylesheet allows the program to specify an uniform height for all the images in the same style class. For the code below, the height property reduces the size of the image to 50 pixels. The height property works on Internet Explorer, but not on Netscape.
Overline Property
The overline property in CSS places a line above the tagged sentences. This property works for Internet Explorer, and again, not for Netscape.
Bottom-Margin
The Bottom-Margin property in CSS sets the margin spacing at the bottom of the page. This property works in Netscape but not in Internet Explorer. The text goes right to the bottom in the Internet Explorer Browser.
Box Properties
The border-colors set in ul will create a solid box above the inclosed content. This is presented below by the blue box above the text. This border property is ignored by Internet Explorer but works under Netscape.
The border-colors set in h1 will create a border around around the contents within the heading. This will give the effect of the purple box below. Header borders work in the Internet Explorer browsers but not the Netscape one.
The border-colors set in p will create a solid box to the left of the inclosed content. This is presented below by the blue box to the left of the text. This border property is ignored by Internet Explorer but works under Netscape.
 ul {border-color: blue; border-top-width: 0.5in;} -->ignored by Internet Explorer
 h1 {border-color: purple; border-style: solid;} -->ignored by Netscape
 p {border-color: blue; border-left-width: 3em; border-left-width: 3em} -->ignored by Internet Explorer
Make sure the order of tags in your HTML file is consistent with the order of the tags in the CSS file because the browser, especially Netscape, may not be able to recognize and follow.



TagsNetscapeInternet Explorer
Floating FrameNoYes
Multi Column TextYesNo
MarqueesNoYes
SpacerYesNo
Color of Horizontal RuleNoYes
Background for TableNoYes
Bordecolorlight for TableNoYes
Bordercolordark for TableNoYes
Frame for TableNoYes
Rules for TableNoYes
On the CSS section, we covered a few of the properties, they are height property, overline property, bottom margin, and box properties. Through the testing we have done, we realized that both browsers are trying to work closely with CSS but Internet Explorer seems to do better in most properties. There is a lot of testing to do in CSS, and it is also endless. Instead of showing you every single test, we rather offer you something that is already done on the Internet. That is the Master Compatibility Chart by Eric Meyer. However, in here, we would like to stress that the chart by Eric Meyer is not completely reliable because CSS depends on a lot of other factors, including how one arranges and inserts his or her codes. Again, the chart is for reference ONLY!
Both Netscape Navigator and Internet Explorer are good browsers for just surfing the Internet and viewing web pages. It doesn't really matter which one you use. However each has advantages over the other. Netscape Navigator has some advantages over Internet Explorer. The biggest advantage is that Netscape Navigator supports more platforms or operating systems than Internet Explorer. Internet Explorer will only run on Windows 95/98, Windows NT, and a specific version of Mac OS. Netscape Navigator runs on both of these platforms, as well as Windows 3.1, Macintosh, and several Unix platforms. Both Netscape Navigator and Internet Explorer support the more popular HTML extensions. Also, Netscape Navigator can run all of the Netscape plug-ins, whereas Internet Explorer can run only some of them. Internet Explorer however, has introduced a new technology, called ActiveX, to replace Netscape's plug-ins. Although this technology is easier to use, plug-ins are more widely used and are more readily available.
The reason that Internet Explorer seems to be more outstanding than Netscape Navigator is because it has a better user interface and is easier to use. Netscape Navigator on the other hand has a better news and email system. When talking about performance, Netscape Navigator is faster at loading pages, but Internet Explorer can reload web pages stored in the computer's memory and display large graphics more quickly. On the other hand, Internet Explorer is faster at running Java, a language used to animate web pages. Even though the level of security Internet Explorer has for sending information over the web might not be as good as Netscape's, it is decent and also has options that make it easier for parents to screen what is seen.

Another difference between Netscape and Internet Explorer is in the implementation of content positioning. Netscape uses the LAYER tag while Microsoft bases its approach on a combination of Cascading Style Sheets (DIV and SPAN tags), Active X, its own Document Object Model.
 Don't use the WORD-SPACING property, as it is completely ignored in Internet Explorer.
 Internet Explorer does not accept the PRE modifier for WHITE-SPACE (which kind of defeats much of the purpose for using it).
 Netscape Navigator 6.0 does not understand the NONE value for the CLEAR property, though it understands the rest.
 While Internet Explorer 5.5 manages to pass all of the standard tests for the FLOAT property, it fails to pass the infamous FLOAT "acid test"--which, as part of the CSS1 Test Suite, can be found at http://www.w3.org/Style/CSS/Test/current/sec5526c.htm -- so be wary of using it extensively.
 LIST-STYLE-TYPE is problematic in Opera 5.0.1. Ditto with the WORD-SPACING property.
 Internet Explorer 5.5 seems to have some problems discerning the proper cascading order when multiple @IMPORT statements are used.
 When using ID as a selector, make sure you use the same case for specifying it, as Netscape Navigator 6.0 will interpret ID="GREEN" and ID="green" differently (when it shouldn't).
 Beware using large images with LIST-STYLE-IMAGE, is they may be chopped at the browser margin is displayed in Netscape Navigator 6.0 and Opera 5.01.
 BORDER-STYLE works in all of the major browsers, but note that BORDER-STYLE: DOTTED produces square "dots" in Netscape Navigator 6.0 and Opera 5.01, and filled circles in Internet Explorer 5.5.
 All of the major browsers have problems with the FONT-WEIGHT property. Weights from 100 to 300 are all rendered the same and FONT-WEIGHT: BOLDER does not appear to work in Netscape Navigator 6.0 or Internet Explorer 5.5 (though it does work in Opera 5.01).

T
he difference between the two main browsers is a philosophical one (at base) so it is likely that both will continue into the forseeable future. It is the difference in outlook between the "tortoise and the hare".
The two main characteristics by which we might classify a browser are:
 Coverage
 Speed
By coverage I mean "What possible types of Web pages can the browser display?"
Here, Internet Explorer wins easily. I have 'pressed' the capabilities of each to their limit and find that Netscape 'poops' out long before IE 3.02. It will display things (particularly in frames) that Netscape chokes on. Clearly, Microsoft has chosen to be 'more thorough'. It upholds the logic of html to a much tighter degree and so can go the 'extra mile'.
Internet Explorer is the tortoise.
Speed is another matter. Netscape wins hands down. If it can display the page at all ... it will display it faster than IE3. Apparently, those at Netscape are willing to sacrifice some measure of functionality in exchange for speedy display of the preponderance of pages offered on the internet.
Netscape Navigator is the hare.
Internet Explorer 3.0 takes forever to load from disk. It takes forever to 'decide' what to do with a frame page it encounters. Netscape Navigator 3.0 loads fast and puts up a simple frame in a couple seconds seeming not to have to figure out what to do with it, merely trusting that it will be uncomplicated. The impression I get is that Microsoft has told its programmers to subsume more possibilities than Netscape and so requires more code to load and check through.
If you want to put lots of, or big animations on a page your best bet is to view it with IE 3.+ and not with Netscape. I recently had to remake my largest page (~320K with gifs) to accomodate Netscape users because the animations running behind the view screen in that page were causing Netscape problems (writing to hard drive, swapping, etc.). There were however no problems with my copy of IE3.02.
I have always found myself trying to stay within the boundaries of Netscape but not IE.
Again, the difference is a legitimate one of philosophy. Netscape wants the greatest speed for the most users. Internet Explorer wants the greatest coverage of the "yet to be written web pages" as well as those already here.
Both viewpoints are important and the goals are equally laudable. For this reason, they are both likely to be around for a long time to come. So if you want speed ... go with Netscape. If you want to do big, complicated things ... go to Internet Explorer.
I personally use both equally depending on whatever ...
Actually, I often use three browsers at the same time.
 Netscape Navigator 3.0
 Internet Explorer 3.02
 And that AOL "thing"
I have to use the AOL thing to send e-mail since AOL does not support email from outside its "truncated" window. However, they do make it easy to use another browser. You just 'open it separately' and go.
Example:
In IE you can color <td>'s. In Netscape you can't.
For some insights into browsers and their ways, see for example "Professional JavaScript" ISBN 1-861002-70-X.


You can contact me in srinivas_an@yahoo.com
 
Consider Paul's rocket mass heater.
 
subject: IE and NN Compability
 
Similar Threads
feature testing - float property using javascript - IE, Firefox - cssFloat, styleFloat
Script Error in IE
Calling WebService using plain JavaScript
style property value detection
JApplet - Javascript communication