667Chapter 28 .The Navigator and Other Environment Objects (Web site management)
Wednesday, October 31st, 2007667Chapter 28 .The Navigator and Other Environment Objects About this object In Chapter 16, I repeatedly mention that the window object is the top banana of the document object hierarchy. In other programming environments, you likely can find a level higher than the window perhaps referred to as the application level. You may think that an object known as the navigator object is that all-encompass ing object. That is not the case, however. Although Netscape originally invented the navigatorobject for the Navigator 2 browser, Microsoft Internet Explorer also supports this object in its object model. For those who exhibit partisan feelings toward Microsoft, IE4+ provides an alternate object clientInformation that acts as an alias to the navigatorobject. You are free to use the IE-specific terminology if your development is intended only for IE browsers. All properties and methods of the navigatorand clientInformation objects are identical. In the rest of this section, all references to the navigatorobject also apply to the clientInformation object. Be aware that the number of properties for this object has grown with virtually every browser version. Moreover, other than some basic items that have been around since the early days, most of the more recent properties are browser-spe cific. Observe the compatibility ratings for each of the following properties very carefully. Most of the properties of the navigator object deal with the browser program the user runs to view documents. Properties include those for extracting the ver sion of the browser and the platform of the client running the browser. Because so many properties of the navigatorobject are related to one another, I begin this discussion by grouping four of the most popular ones together. Properties appCodeName appName appVersion userAgent Value: String Read-Only NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . These four properties reveal just about everything that browser-sniffing code needs to know about the user s browser brand, version, and other tidbits. Of these four, only the last three are particularly valuable. The first property in the list, appCodeName, defines a class of client that encompasses essentially every standard browser. The value returned by browsers, Mozilla, is the code name of the first browser engine on which NN and IE browsers at one time were based (the NCSA Mosaic browser). This information does nothing to help your scripts distinguish among browser flavors, so you can ignore the property. But the other three properties are the ones with all the goodies. navigator.appCodeName
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.