Firefox/URL Bar Algorithm: Difference between revisions

No edit summary
Line 20: Line 20:


* If the string contains a space, split on the first space and examine the first token.
* If the string contains a space, split on the first space and examine the first token.
* If it's a search engine keyword, expand using the relevant search URL.
** If it's a search engine keyword, expand using the relevant search URL.
* If it's a user-defined keyword, expand that.
** If it's a user-defined keyword, expand that.


...
...
Line 27: Line 27:
* If it looks like a search according to [http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp#804 this algorithm], insert it into the <tt>keyword.URL</tt> preference value to produce a search URL, since the <code>keyword.enabled</code> preference defaults to true in Firefox.
* If it looks like a search according to [http://mxr.mozilla.org/mozilla-central/source/docshell/base/nsDefaultURIFixup.cpp#804 this algorithm], insert it into the <tt>keyword.URL</tt> preference value to produce a search URL, since the <code>keyword.enabled</code> preference defaults to true in Firefox.
** Note: "insert it into the <tt>keyword.URL</tt> preference" now means "perform a search using the default search engine", when keyword.URL's value is empty (the default in Firefox)
** Note: "insert it into the <tt>keyword.URL</tt> preference" now means "perform a search using the default search engine", when keyword.URL's value is empty (the default in Firefox)
* The algorithm says it's a search if it contains a space or a quote before the first dot, colon or question mark, or if it starts with a question mark.
** The algorithm says it's a search if it contains a space or a quote before the first dot, colon or question mark, or if it starts with a question mark.


...
...
Confirmed users, Bureaucrats and Sysops emeriti
722

edits