Talk:Browser.urlbar.default.behavior

From MozillaZine Knowledge Base
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Possible values and their effects

Added 0 (no filtering) which is the default for Firefox. [1] The default for SeaMonkey is 1 (History). [2] Alice 13:55, 22 September 2009 (UTC)

Also, what about including 3 (visited bookmarks) as a possible value?

http://mxr.mozilla.org/comm-central/source/mozilla/browser/app/profile/firefox.js
   232 // The special characters below can be typed into the urlbar to either restrict
   233 // the search to visited history, bookmarked, tagged pages; or force a match on
   234 // just the title text or url.
   235 pref("browser.urlbar.restrict.history", "^");
   236 pref("browser.urlbar.restrict.bookmark", "*");
   237 pref("browser.urlbar.restrict.tag", "+");
   238 pref("browser.urlbar.restrict.typed", "~");
   239 pref("browser.urlbar.match.title", "#");
   240 pref("browser.urlbar.match.url", "@");
   241
   242 // The default behavior for the urlbar can be configured to use any combination
   243 // of the restrict or match filters with each additional filter restricting
   244 // more (intersection). Add the following values to set the behavior as the
   245 // default: 1: history, 2: bookmark, 4: tag, 8: title, 16: url, 32: typed
   246 // E.g., 0 = show all results (no filtering), 1 = only visited pages in history,
   247 // 2 = only bookmarks, 3 = visited bookmarks, 1+16 = history matching in the url
   248 pref("browser.urlbar.default.behavior", 0);

Alice 13:55, 22 September 2009 (UTC)

Combined values

I'm also wondering, is the "visited bookmarks" value (3) the intersection (combination) of the restrictions, "only visited pages in history" (1) and "only bookmarks" (2)? If so, maybe you could add a "Combined values" paragraph underneath the main list of values, showing the effects of of various combinations. You could list "Visited bookmarks: 3 (1+2)" as well as the other examples already mentioned (17=History+match URL; 49=History+match URL+Typed)? Just a thought. Alice 21:37, 22 September 2009 (UTC)

Make sure not to get confused by what those values mean to represent. They are not possible values of the pref, but represent the meaning of each bit in the binary representation: 1: bit0 2:bit1 4:bit2 8:bit3 16:bit4 32:bit5. So even the mention of the default settings does not apply.

I'm thinking about moving the default values text to above that table because the purpose of that list is to show the meaning of bits in the bit map that forms the pref and not the meaning of the value of the pref (then you will have to mention all possible 64: 0-63 values to be complete).
I think that 3 (History+Bookmarks: visited bookmarks) is the same as 0 for the last two bits and that applies to others as well, but I haven't tested that. If you apply all filters or matches (title+url) then that is the same as no filtering.
If you want to add examples then use an extra Example section to show some useful examples and leave the list that shows the meaning of the bits as I originally wrote it. Otherwise it is difficult to make your own filter.
--Dickvl 22:54, 23 September 2009 (UTC)

Dick, I'm not going to make any additional changes to this article, then. Alice 23:06, 23 September 2009 (UTC)

How about this text for the 'Possible values and their effects' section?
The list below shows the meaning of the 6 bits (0-5) that are currently used to compose the default filter for the location bar. You can override the default filter by using commands in the location bar. See Location Bar search.
The default in Firefox 3.5 and above is 0 meaning that no filtering is applied. [3]
The default in SeaMonkey 2 is 1, meaning that only History items are shown. [4]
--Dickvl 23:20, 23 September 2009 (UTC)

Dick, You have to be careful about making the section too complicated. The section itself is titled "Possible values and their effects". so I think the section should simply include a listing of possible values for the preference, which includes the combined value 3 "visited bookmarks" . I think that you should explain about the technical aspects ("meaning of each bit in the binary representation) and how the restrict and match filters can be combined in a section above that (maybe under Background?). I'm not going to make any additional changes to this article, for now, though. since I don't understand what you meant by I think that 3 (History+Bookmarks: visited bookmarks) is the same as 0 for the last two bits. As I understand it, 0 is "no filtering" or showing all results (which means showing all bookmarks and history results in Firefox). Combining the restrictions (1+2) for a value of 3 results in filtering on BOTH the set of visited pages (History) and the set of Bookmarks, so the intersection is a smaller subset of "visited bookmarks". I haven't tested either, though.Alice 23:39, 23 September 2009 (UTC)

Default values

I created a new "Default values" section for the preference value defaults for Firefox (0 - no filtering) and SeaMonkey 2 (1 - only History) since that information doesn't belong in the Background section. I still think that all possible values, including defaults, belong under the "Possible values and their effects" section but I'll compromise. Alice 11:03, 24 September 2009 (UTC)

about:config entries article

Btw: I opened the browser. section in about:config and it is pretty big with 61 KB. We should be careful with adding extra prefs to that section or maybe break it in a few sub tables. I'm not sure if such a large table works for users with older and slower computers. --Dickvl 23:24, 23 September 2009 (UTC)

That's something that should be mentioned on the about:config entries article's Discussion page. Alice 23:39, 23 September 2009 (UTC)