The USER.JS File


The user.js is a file that you create, i.e., a user generated file. The creation of the file is simple enough. Open Notepad, and add the scripts for tweaks that you wish to include in your Netscape or Mozilla browser. Then save the file as user.js, to:

Windows 2000/Windows XP
C:\Documents and Settings\user_name\Application Data\Mozilla\Profiles\profilename\xxxxxxxx.slt
NOTE: These files are hidden by default.
To see hidden files:
1. On the Tools menu in Windows Explorer, click Folder Options
2. Click the View tab
3. Under Hidden files and folders, click Show hidden files and folders

Windows 98
C:\Windows\Application Data\Mozilla\Profiles\profilename\xxxxxxxx.slt

Windows NT
C:\Winnt\Profiles\user_name\Application Data\Mozilla\Profiles\profilename\xxxxxxxx.slt

Windows ME
C:\Windows\Application Data\Mozilla\Profiles\profilename\xxxxxxxx.slt

Windows 95
C:\Windows\Mozilla\Profiles\profilename\xxxxxxxx.slt

Neither Netscape or Mozilla will overwrite the user.js file. Options added to the user.js file will overwrite those in the prefs.js file. Another perk of the user.js file is that you can edit the file with Netscape or Mozilla open, unlike the prefs.js. The scripts entered in this file will override the prefs.js scripts.

You must also be mindful that any edits to the user.js file are recorded in the prefs.js file. Thus, if an entry is deleted in the user.js, you will also need to delete that entry in the prefs.js file.

Some users have only one entry, and others have multiple entries. Scroll down for an example of a user.js file.
Scripts for the user.js file are listed HERE

The default backup method for Netscape 7/Mozilla backs up the prefs.js file when you close mozilla, which is when it writes to the prefs.js file. It does work, but manual is better for peace of mind. Of course, this is the reason to keep most of the options in the user.js file, and keep them properly commented. The prefs.js file has many profile specific settings (mail & news paths, password file, wallet file, etc.) which require manual editing if you ever need to create a new profile.



Example user.js file:

// this line is a comment

// Mail
// Classic ">" back instead of the vertical bar
user_pref("mail.quoted_graphical", false);
user_pref("mail.quoteasblock", false);

// Author Wrote
user_pref("mailnews.reply_header_type", 2);
user_pref("mailnews.reply_header_authorwrote", " the esteemed %s replied, with the utmost intelligence");
user_pref("mailnews.reply_header_separator", " ");
user_pref("mailnews.reply_header_ondate", "On this day, %s,");
user_pref("mailnews.reply_header_colon", "");

// Don't abbreviate NG and Mail Folder Names
user_pref("mail.server.default.abbreviate",false);

// Show UA String
user_pref("mailnews.headers.showUserAgent", true);

// Wrap Long Lines in View | Page Source
user_pref("view_source.wrap_long_lines", true);

// To reactivate plaintext tags add the following line to your user.js
user_pref("mail.display_struct", true);

// throbber
user_pref("browser.throbber.url","http://www.google.com");



Kudos to tranquilo for contributing to the above information.


02/01/04


Back to Top



Return to Netscape Solutions