Changing autocomplete behavior - Firefox: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (typo)
m (→‎External links: added bug 740076)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The [[:Category:Location Bar|Location Bar]], the [[Search Bar]] and some form fields on web pages have autocomplete dropdowns that appear with a list of previously-entered data. You can disable the display of autocomplete entries by [[Editing configuration | editing your configuration files]] as described below.
The [[:Category:Location Bar|Location Bar]] (also called the URL or address bar), the [[Search Bar]], and some form fields on web pages have autocomplete dropdowns that appear with a list of previously-entered data. Starting in Firefox 14,  as you type URLs into the Location Bar, Firefox also automatically completes the URL (called "[[inline autocomplete]]") in addition  to the drop-down autocomplete list.  


Location Bar autocomplete is an integral part of the History mechanism and persists for the same duration as History items. In Firefox 2, the only way you can fully disable Location Bar autocomplete is by disabling History; this can be done by changing the Privacy setting, "Remember visited pages" to zero.  Starting in Firefox 3, however, this only prevents additional History items from accumulating  ([https://bugzilla.mozilla.org/show_bug.cgi?id=366075 bug 366075]) and the Firefox 3 Location Bar ("Smart Location Bar") will still display bookmarks in the autocomplete drop down list, even if you clear the browsing history.
*To disable or enable inline autocomplete , see [[Inline autocomplete]].


You can use these methods to modify or disable the display of autocomplete entries:
* To disable autocomplete in form fields and the Search Bar, go to "[[Menu differences|Tools -> Options]] ->  Privacy".  Under History, set "Firefox will:" to "Use custom settings for history" and remove the check mark from the box that says "Remember search and form history".  For more information, see [http://support.mozilla.com/kb/Form+autocomplete Form autocomplete] at Firefox Support.


== Preventing autocomplete display with UserChrome.css==
In Firefox 3 and above, when you start typing into the Location Bar,  the autocomplete drop-down will show matching sites from your browsing history and bookmarks.  You can modify or disable the display of autocomplete entries in the Location Bar, as explained below.
Note that this method does not actually delete the internal lists of previously-entered data; it merely prevents their display.   
 
'''The method below has some problems. It will cause some errors appear in the [http://developer.mozilla.org/en/docs/JavaScript_Console JavaScript Console] if you have [[Dev : Useful prefs | chrome errors enabled]], and in some circumstances it may cause the browser to malfunction.'''
== Changing Location Bar autocomplete behavior==
As you type into the Location Bar, the default behavior is to display all results from both bookmarked items and your browsing history of visited pages in a drop-down list.  (This feature is often called the "Awesome Bar").   You can change Location Bar autocomplete behavior in "[[Menu differences|Tools -> Options]] -> Privacy / Location Bar" by selecting one of the options in the "When using the location bar, suggest:" drop-down menu:
* History and Bookmarks (default) - Displays both visited pages in history and bookmarked items (no filtering)
* History - Restricts results to visited pages in history
* Bookmarks - Restricts results to bookmarked items
* Nothing - No autocomplete results are displayed
Selecting "Nothing" sets the preference [[browser.urlbar.autocomplete.enabled]] to '''false''' and completely disables Location Bar autocomplete. This also disables [[inline autocomplete]] in Firefox 14 and above. [https://bugzilla.mozilla.org/show_bug.cgi?id=740076]  


In [[userChrome.css]], add the following lines:
Selecting "History and Bookmarks", "History", or  "Bookmarks" enables autocomplete (if disabled) and sets a corresponding value in the preference [[browser.urlbar.default.behavior]].  
/* Remove autocomplete dropdown */
#PopupAutoComplete > .autocomplete-tree { display: none !important; }


If you also want to remove the dropdown button at the far right of the Location Bar, add the following line:
As long as autocomplete is enabled,  you can also change autocomplete Location Bar behavior using [[about:config]],  by changing the '''browser.urlbar.default.behavior''' preference value .  For example,  setting the value to '''1'''  restricts results to visited pages in history, setting the value to  '''2''' restricts results to bookmarked items, and resetting the preference restores the default value '''0''' (no filtering). You can also restrict autocomplete results to tagged items (value = '''4''') or to typed items (value = '''32''') or you can match only the title (value = '''8''') or the URL (value = '''16''').  You can also add filters together in various combinations, such as setting the value to '''3''' (1+2)  to display only visited bookmarks; or, setting the value to '''17''' (1+16) to display only visited pages with a URL match; or, setting the value to '''49''' (1+16+32) to display only visited pages with a URL match for typed items.  See the article [[browser.urlbar.default.behavior]] for more information.  [http://mxr.mozilla.org/comm-central/source/mozilla/browser/app/profile/firefox.js#242]
.autocomplete-history-dropmarker { display: none !important; }
 
You may also want to enable [[inline autocomplete]].
 
== Changing autocomplete behavior using about:config==
To prevent  entries from History or bookmarked items from appearing but show those that you have specifically typed into the Location Bar (url bar), use [[about:config]] to toggle '''browser.urlbar.matchonlytyped''' to '''true'''. To completely disable the Location Bar autocomplete function in Firefox 3, modify the preference [[browser.urlbar.maxRichResults]] to '''0''' (zero). [http://forums.mozillazine.org/viewtopic.php?p=3440955#p3440955] 
 
For additional information about modifying the "Smart Location Bar" behavior in Firefox 3, see the MozillaZine forum topic, [http://forums.mozillazine.org/viewtopic.php?f=38&t=685365 Customising the Firefox 3 Location Bar] and [http://forums.mozillazine.org/viewtopic.php?p=3463085#p3463085 this forum post].


==See also==
==See also==
*[[Deleting autocomplete entries]]
*[[Deleting autocomplete entries]]
*[[Location Bar search]]
*[[Viewing_the_browsing_history_-_Firefox#Deleting_history_items|Viewing the browsing history - Firefox (Deleting history items)]]


==External links==
==External links==
*[http://support.mozilla.com/en-US/kb/Smart+Location+Bar Smart Location Bar (Firefox Support)]
*[http://support.mozilla.com/kb/Location+bar+autocomplete  Location bar autocomplete (Firefox Support)]
*[http://support.mozilla.com/en-US/kb/How+to+disable+the+Smart+Location+Bar How to disable the Smart Location Bar (Firefox Support)]
*[http://support.mozilla.com/kb/Cannot+clear+Location+bar+history Cannot clear Location bar history (Firefox Support)]
*[http://bbayles.googlepages.com/disable_slb.html How to disable Firefox 3's Smart Location Bar]  at bbayles.googlepages.com
'''Extensions'''
*Extensions that modify the Firefox 3 Smart Location Bar behavior:
*Extensions that modify the Firefox 3 Location Bar behavior:
** [https://addons.mozilla.org/en-US/firefox/addon/7429 Hide Unvisited] - This shows only URLs in your History
** [https://addons.mozilla.org/firefox/addon/7429 Hide Unvisited] - This shows only URLs in your History
** [https://addons.mozilla.org/en-US/firefox/addon/8310 Awesome Options] - This gives you many options to fine tune the Location Bar.
** [https://addons.mozilla.org/firefox/addon/7637 Old Location Bar] -   This returns the Location Bar to an almost Firefox 2 Behavior.
** [https://addons.mozilla.org/en-US/firefox/addon/7637 Old Location Bar] -   This returns the Location Bar to an almost Firefox 2 Behavior.
*Extensions that only modify the appearance of the Firefox 3 Location bar autocomplete
** [https://addons.mozilla.org/firefox/addon/6227 oldbar] oldbar makes the location (URL) bar look like Firefox 2 (one line per url)
** [https://addons.mozilla.org/firefox/addon/7674 Locationbar Limit] -  Change number of visible results shown in locationbar dropdown when searching (with/without oldbar)
 
'''Related bug reports'''
*[https://bugzilla.mozilla.org/show_bug.cgi?id=393508 Bug 393508] - Mockup: Location Bar Autocomplete for Firefox 3
*[https://bugzilla.mozilla.org/show_bug.cgi?id=405745 Bug 405745] - [meta] improve url bar autocomplete results
*[https://bugzilla.mozilla.org/show_bug.cgi?id=740076 Bug 740076] - autoFill should be disabled by the autocomplete preference


[[Category:Location Bar]]
[[Category:Location Bar]]
Line 39: Line 44:
[[Category:Configuration]]
[[Category:Configuration]]
[[Category:Privacy and security]]
[[Category:Privacy and security]]
[[Category:History]]

Latest revision as of 23:53, 25 November 2012

The Location Bar (also called the URL or address bar), the Search Bar, and some form fields on web pages have autocomplete dropdowns that appear with a list of previously-entered data. Starting in Firefox 14, as you type URLs into the Location Bar, Firefox also automatically completes the URL (called "inline autocomplete") in addition to the drop-down autocomplete list.

  • To disable autocomplete in form fields and the Search Bar, go to "Tools -> Options -> Privacy". Under History, set "Firefox will:" to "Use custom settings for history" and remove the check mark from the box that says "Remember search and form history". For more information, see Form autocomplete at Firefox Support.

In Firefox 3 and above, when you start typing into the Location Bar, the autocomplete drop-down will show matching sites from your browsing history and bookmarks. You can modify or disable the display of autocomplete entries in the Location Bar, as explained below.

Changing Location Bar autocomplete behavior

As you type into the Location Bar, the default behavior is to display all results from both bookmarked items and your browsing history of visited pages in a drop-down list. (This feature is often called the "Awesome Bar"). You can change Location Bar autocomplete behavior in "Tools -> Options -> Privacy / Location Bar" by selecting one of the options in the "When using the location bar, suggest:" drop-down menu:

  • History and Bookmarks (default) - Displays both visited pages in history and bookmarked items (no filtering)
  • History - Restricts results to visited pages in history
  • Bookmarks - Restricts results to bookmarked items
  • Nothing - No autocomplete results are displayed

Selecting "Nothing" sets the preference browser.urlbar.autocomplete.enabled to false and completely disables Location Bar autocomplete. This also disables inline autocomplete in Firefox 14 and above. [1]

Selecting "History and Bookmarks", "History", or "Bookmarks" enables autocomplete (if disabled) and sets a corresponding value in the preference browser.urlbar.default.behavior.

As long as autocomplete is enabled, you can also change autocomplete Location Bar behavior using about:config, by changing the browser.urlbar.default.behavior preference value . For example, setting the value to 1 restricts results to visited pages in history, setting the value to 2 restricts results to bookmarked items, and resetting the preference restores the default value 0 (no filtering). You can also restrict autocomplete results to tagged items (value = 4) or to typed items (value = 32) or you can match only the title (value = 8) or the URL (value = 16). You can also add filters together in various combinations, such as setting the value to 3 (1+2) to display only visited bookmarks; or, setting the value to 17 (1+16) to display only visited pages with a URL match; or, setting the value to 49 (1+16+32) to display only visited pages with a URL match for typed items. See the article browser.urlbar.default.behavior for more information. [2]

See also

External links

Extensions

  • Extensions that modify the Firefox 3 Location Bar behavior:
  • Extensions that only modify the appearance of the Firefox 3 Location bar autocomplete
    • oldbar oldbar makes the location (URL) bar look like Firefox 2 (one line per url)
    • Locationbar Limit - Change number of visible results shown in locationbar dropdown when searching (with/without oldbar)

Related bug reports

  • Bug 393508 - Mockup: Location Bar Autocomplete for Firefox 3
  • Bug 405745 - [meta] improve url bar autocomplete results
  • Bug 740076 - autoFill should be disabled by the autocomplete preference