Standardized client configuration is quite different in Netscape Communicator 4.0 and Netscape Communicator Professional Edition 4.0 than in its predecessors. You have more methods, more options within those methods, and a new degree of platform independence. The methods you choose and the extent to which you use them depends on how thoroughly you want to standardize and customize Communicator (either version) in your enterprise.

This documentation covers the overall subject of client configuration. It goes into depth only in areas not covered by specific resources such as Netscape Mission Control.

You can control virtually every modifiable attribute of Communicator's components with Mission Control. You can readily change many attributes through the Configuration Editor, and you can also customize those and other preferences by directly editing the JavaScript functions in Communicator's configuration files. On Windows platforms, you can control which Communicator components open initially, and what they do when they open, with command line configuration options. On all platforms you can customize bookmark files to suit your enterprise. Each of these topics is covered in a section of its own.

There are ways to customize Communicator that go beyond these configuration techniques. More advanced customizing involves directly editing resources such as bitmaps and Help files, and incorporating those changed files into an installation set with the Install Builder component of Mission Control. See Mission Control for more information.

There are also many indirect ways to influence Communicator's performance or connections, such as through proxy servers or firewalls, but those methods fall outside this document.

Configuring Preferences with JavaScript

You can customize Communicator 4.0 for your enterprise by using Mission Control's Configuration Editor and Install Builder to create and deploy a standard configuration file with each installation. Communicator reads its configuration information from this file each time it starts.

Communicator Professional Edition 4.0 also supports AutoConfig, a centralized, cross-platform capability that can dynamically customize a wide array of Communicator's features and operating characteristics. You can manage all these attributes through JavaScript configuration functions you add to a resource that Communicator reads at start-up, and if you want, re-reads at preset intervals while running. The resource can be a simple ASCII text file (typically named config.jsc) or any mechanism that can send the functions by HTTP, such as a CGI script. You can use the JavaScript functions with other JavaScript programming to evaluate dynamically what the resource tells Communicator Pro.

You can control any available configuration feature through AutoConfig; any features you choose not to control are left to users or follow the local or built-in defaults.

Similar to previous versions, you can also customize the standard Communicator product with Mission Control by editing and deploying the netscape.cfg file (formerly called netscape.lck) with each installation. But with the Professional Edition you can place the same (or even more dynamically evaluated) customization information in a central resource that's readily accessible to you and easy to change.

These sections explore the details of configuring preferences with JavaScript.

What to Configure
How Configuration Works
Configuration Functions
Configuration Preferences

What to Configure

To support broad-based administration you can place customization or configuration information in two resources: the netscape.cfg file you can deploy with each copy of Communicator (standard or Pro) and/or the AutoConfig configuration resource that the Professional Edition can read (typically an ASCII file named config.jsc). Professional Edition installations commonly use netscape.cfg just to supply the pointer to config.jsc. The more you'll benefit from administrative centralization and ease of configuration updating, the more likely you'll want to use AutoConfig.

You use Mission Control's Configuration Editor to create a master copy of netscape.cfg. Through the Configuration Editor you can set the AutoAdmin URL and manage dozens of other preferences, including many not accessible to users, such as custom menus. When you use netscape.cfg to point to config.jsc, you can edit config.jsc with a text editor. See Mission Control's documentation for more information.

You can also configure individual Communicator installations by modifying the prefs.js file with a text editor. The content of this file can be identical to netscape.cfg or config.jsc, within the limitations of Communicator standard or Pro and your operating environment.

How Configuration Works

When the standard version of Communicator runs, it first reads a built-in set of configuration defaults. It next reads any preferences set by users, which are stored in prefs.js files. Then, Communicator reads any global (enterprise-wide) preferences contained in netscape.cfg, if it's present.

Communicator Professional Edition carries this a step further. If netscape.cfg points to and enables an AutoConfig URL, Communicator Pro reads that too. At each stage of the configuration process the incoming preferences overwrite the defaults or previously set preferences, if any.

Communicator Pro automatically retains a local copy of the configuration information it last fetched from the AutoConfig URL. Communicator Pro reads this copy when it starts up offline or a user runs it just to view local HTML files.

Configuration Functions

You customize Communicator by setting preference values with particular JavaScript functions. You can categorize these functions by the required object (or wrapper function) they appear within. These objects are PrefConfig{} (for configuring general client preferences) and AutoInstall{} (for setting client's software AutoUpdate triggers).

PrefConfig Functions

You wrap the above functions within the PrefConfig{} object. Precede the functions with:

with (PrefConfig) {

and follow them with:

} // with (PrefConfig).

AutoInstall Functions

You wrap the above functions within the AutoInstall object. Simply precede the functions with:

with (AutoInstall) {

and follow them with:

} // with (AutoInstall).


Here's an example of each of the above configuration functions.

config( "win_animation_file", "mylogo.bmp" )

This function identifies a locally available custom animation file to display for clients on the Windows platform.

defaultPref( "browser.anchor_color", "#00FF00" )

This function causes Navigator to display links in green instead of the default blue (#0000FF). Users can change this setting through the Preferences dialog box.

lockPref( "browser.anchor_color", "#00FF00" )

This function causes Navigator to display links in green instead of the default blue (#0000FF). Users can see this setting in the Preferences dialog box, but can't change it.

unlockPref( "browser.anchor_color" )

This function releases the anchor color preference to user control through the Preferences dialog box.

getPref( "network.hosts.pop_server" )

In this case, getPref() returns the name of the current POP mail server. With JavaScript you could, for example, compare the returned value to another, and if appropriate change to a different server using the defaultPref() function.

getLDAPAttributes( host, base, filter, attributes )

This function returns the current value or values, if any, for the LDAP-related arguments. For example, filter might reference a variable assembled from "mail=" + getPref("mail.identity.useremail"). This function is available in Communicator Professional Edition only.

getLDAPValue( values, attribute )

This function returns the current value or values, if any, for the LDAP-related arguments. For example, attribute might reference a variable created by var attribute = "cn,telephonenumber,manager". This function is available in Communicator Professional Edition only.

VersionInfo( major, minor, release, build)

This function creates a VersionInfo object for a component and sets integers for its parameters (which default to 0 if not set).

getVersion( component, vers )

This function begins an unconditional download of the named component and returns a value of 0 if successful (or an error code if not successful). If successful, this function also places the component's version number into the variable vers, where it can be used by startUpdate().

startUpdate( url )

This function begins an unconditional update from the resource at the given URL.

startUpdate( url, component, vers )

This function begins a conditional update from the resource at the given URL. The update occurs only if the value placed in vers using getVersion() is newer than that component's version value in the local Client Version Registry.

Configuration Preferences

The items you can configure through Mission Control's Configuration Editor are self evident. However, you can affect these and many other Communicator Professional Edition preferences if you choose to directly modify the AutoConfig file.

Detailed References

See Communicator Preferences for the complete list of configuration and preference items.

Configuring from the Command Line

The AutoConfig feature of Communicator Professional Edition is the most convenient and efficient cross-platform method for uniformly controlling Communicator deployments. You can also activate some of these same settings, ones that affect how the program opens in Windows, through command line options.

Communicator itself uses this mechanism to make its Windows 3.1x and Windows 95 icons and shortcuts activate the right components.

To edit a command line option, open the Properties dialog of an icon or shortcut (on Windows 95 also click the Shortcut tab). On the Command or Target line you can add, following a blank space, an option such as -news to have Communicator open with a particular component. For example, the command line c:\communicator\program\netscape.exe -news would open Netscape Collabra. You can put multiple options on a line.

Command line options, by nature, aren't an effective tool for large-scale client rollouts because installations can be modified only individually. This same functionality (and much more) is readily available through Mission Control.

Detailed References

See Command Line Options for a table of options and parameters.

Deploying Standard Enterprise Bookmarks

Your users can have a complete set of bookmarks to your intranet the first time they use Communicator.

Navigator stores bookmarks (URL strings for web resources) in an HTML file named bookmark.htm or bookmark.html, located in Netscape's Program directory on Windows or in the Netscape folder within Preferences in the Mac OS System Folder. The Bookmarks menu displays these URLs by document title if available or by the URL string itself if a title isn't available. Navigator ships with a default bookmark file containing a general collection of pointers to useful resources on the World Wide Web.

You can customize bookmark.htm for your enterprise. For example, your bookmarks could include departmental homepages or FTP directories.

Customizing Bookmarks

There are two ways you can customize the bookmarks file.

The first and easiest way is to edit the file through Communicator's Bookmarks window. Using the Bookmarks window in conjuction with Navigator, you can quickly add, delete, import, and rearrange bookmarks to produce the set you want. When you have finished, just close the Bookmarks window and the local copy of the bookmark.htm file is ready.

Because the bookmark file is an HTML file, you can also edit it with an ordinary text editor. This may be handy if you want to quickly change some bookmark names or descriptions or do search-and-replace. Otherwise, you'll find the Bookmarks window easier to use. Note that HTML editor applications probably aren't useful for editing this file because they can introduce unnecessary HTML coding, or they fail to recognize the structure needed for bookmarks and erroneously "complain" that the file is somehow incorrect.

Deploying Bookmarks

Once you've tailored your enterprise bookmarks file, you deploy it as part of the standard installation by including the file in the master file set you create with Install Builder. See Install Builder's documentation for more information about including customized files.

Note that the content of bookmark.htm remains flexible. Users will be able to add and delete bookmarks after you've deployed Communicator. You can deploy the equivalent of "fixed" bookmarks by customizing the commands on Communicator's Help menu or the Guide button on the personal toolbar using the Configuration Editor.

There is one exception to the above description. Ordinarily there is one bookmark file for each Communicator installation. However, on multi-user installations (where one copy serves more than one person, as commonly happens with Communicator Personal Edition) there can be a bookmark.htm file for each user. These per-profile bookmark files are located in directories reserved for each user profile.