Browser.urlbar.default.behavior

From MozillaZine Knowledge Base
Jump to navigationJump to search

Background

The preference browser.urlbar.default.behavior makes it possible to customize the search behavior of the location bar in Firefox 3.5 and SeaMonkey 2. It replaces browser.urlbar.matchOnlyTyped, which is no longer supported.

The decimal value of this preference should be seen as a bitmap of 6 bits. If a bit in that bitmap is 1 then the corresponding filter will be applied. There are restrict filters (0:History, 1:Bookmarks, 2:Tags, 5:Typed) and match filters (3:Title, 4:URL).
Quote from "defaults\prefs\firefox.js" [1]: "The default behavior for the urlbar can be configured to use any combination of the restrict or match filters with each additional filter restricting more (intersection)."
You can override the default filter by using commands in the location bar. See Location Bar search.
See the articles below by Edward Lee (edilee) for more information and tips.

Default values

The default of this preference in Firefox 3.5 and above is 0, meaning that no filtering is applied. [2]

The default of this preference in SeaMonkey 2 is 1, meaning that only History items are shown. [3]

Possible values and their effects

The section shows the meaning of the 6 bits (0-5) that are currently used to compose the default filter for the location bar.
Add up the following values to set the behavior as the default (i.e., 17=History+match URL; 49=History+match URL+Typed).

Note: In SeaMonkey 2.0, only autocomplete entries for visited pages (History) are generated so setting the value to 2 (Restrict: Bookmarks) or 4 (Restrict: Tags) will not produce any results. In SeaMonkey 2.1 and later, all options are supported and produce the expected results, including the value 0.

1

Restrict: History (^)

2

Restrict: Bookmarks (*)

4

Restrict: Tags (+)

8

Match: Title (#)

16

Match: URL (@)

32

Restrict: Typed (~)

64

Restrict: JavaScript

128

Restrict: Open Tabs (Switch to tab) (%)

UI

Firefox

Tools -> Options -> Privacy -> Location Bar

Other match and restrict bits that are set remain unaffected.

SeaMonkey

Edit -> Preferences -> Browser -> Location Bar

  • "Match only websites you've typed previously": 33 (1+32)
  • "Only match locations, not website titles": 17 (1+16)

If both options are checked, the preference value becomes 49 (1+16+32).

First checked in

  • Dec 10 10:58:43 2008 by Edward Lee [4]
  • Jan 10 22:22:16 2009 by Robert Kaiser [5]

Has an effect in

  • Firefox 3.5 (nightly builds since 2008-12-17)
    • The value 32 only works in builds since 2009-01-07
    • Values 64 and 128 only work in Firefox 4 and later
  • SeaMonkey 2 (nightly builds since 2009-01-10)

Related bugs

Related preferences

See also

External links