Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
130 lines (117 sloc) 19.5 KB

This guide explores ways to navigate to URLs more efficiently inside a web browser, with a focus on the Google Chrome and Mozilla Firefox browsers. It does not cover bookmarks or custom keyword searches, as these are often covered in other guides. This guide emphasizes typing words to navigate rather than clicking and navigating menus.[1]

Table of Contents

Steps

Summary Table

  1. Use the following table. The table summarizes the various strategies for navigation covered later in this article, and helps you decide which strategies to use in a given situation.
    Strategy What you need to remember about a page Pros Cons/caveats
    Address bar A word that appears in the URL or title Easy to use and searching is fast In Google Chrome, the set of URLs that are searched is limited to those visited in the last 3 days or visited at least 4 times or typed at least once
    Search engine (without site: operator) A word that appears in the URL, title, or body of the page You don't need to remember a word or phrase in the URL/title Without the site: operator, a search engine will search all of the internet, so you will possibly have to sift through many irrelevant results
    History search A word that appears in the URL or title Easy to use and searches through all of your browser's history Searching is slower than the address bar
    Site-specific URL manipulation A word that appears in the URL or title of a similar page You don't need to have previously visited the page Requires good understand of the website's URL structure; might require practice to get used to
    Site-specific search (site's search box or search engine with site: operator) A word that appears in the body of the page and the website the page is on You don't need to remember a word or phrase in the URL/title Some sites have a bad search tool; others disable search engine indexing so the site: operator doesn't work
    Browser's history database A word that appears in the URL or title Fully programmable/customizable once setup is complete Requires manual setup
    Mirror of content A word that appears in the URL, title, or body of the page Search criteria more flexible Requires downloading content

Using the Address Bar for a Basic Search

  1. Recognize what the address bar is. The address bar (or URL/keyword navigation bar) is a bar at the top of the browser that displays the current webpage's URL. Most of the time when navigating to a specific page that you have visited in the past, you will be typing words from the URL or title of the page into this bar and selecting from the suggestions given by the browser. In Google Chrome, this bar is called the omnibox. In Mozilla Firefox, it is called the Awesome Bar.
  2. Figure out what you remember about a page. If you can remember words from the URL or title of the page, that makes searching much easier (because the URL and title are what the browser remembers about the page). If you can only remember a phrase that appeared on the page, or an idea discussed on the page, locating the page is much harder.
  3. Type the most uniquely identifying keywords for the page you are looking for. The goal is to quickly find the page you are looking for. To do this, you want to type words that (1) identify the page of interest; and (2) identify as few as possible of pages that are not of interest.
    • If you visit many pages on en.wikipedia.org, then typing "wikipedia" will certainly identify the page of interest, but it will also find many other pages that are not of interest. The end result is that you will only find the most recent or most frequently visited pages on Wikipedia, rather than the specific article you are looking for. It is better to type some word from the article title.
  4. Try variations on words if you can't find what you're looking for. It is possible that (1) you misremembered a specific word that appears in the URL or title (e.g. you remembered a synonym instead of the actual word); (2) the page uses a variant spelling (e.g. US vs UK spelling); (3) the word-breaking used in the URL or title is different (e.g. "commandline" vs "command-line" vs "command line", "CamelCase" vs "camel case").
  5. Try using a search engine if you can't locate the URL in your history. The address bar in both Chrome and Firefox will allow you to directly search the web (using the default search engine or search engine specified in the settings). If the history-based suggestions are not helpful, try hitting anyway to see if a search engine can help.

Using the History Search (Chrome)

  1. Understand what history search is. History search means searching through your browser's entire history. To make the results appear quickly, the omnibox in Chrome limits the set of URLs it will search through, so history search is distinct from using the omnibox. (Firefox may or may not limit the URLs it will search through in the Awesome Bar.)
    • If the URL you want to navigate to does not appear in the omnibox, another option is to use the browser history.
  2. Open the history page. In Chrome, you can go to the browser history by typing or (on a Mac), or clicking Menu (⋮ or ☰) → History → History, or typing chrome://history/ in the omnibox and hitting .
  3. Locate the search box on the history page. At the top is a search box that says "Search history".
  4. Type keywords or parts of a URL to filter the list of results.
  5. Keep the following points in mind when using history search.
    • Both Chrome and Firefox seem to delete old history, so if you last visited a page a long time ago, it may not appear in the history search.[2]
    • At least on Chrome, a page resulting in HTTP error codes like 404 will not be recorded in the history, so they will not show up in history-based searches (omnibox, history search).

Using Site-Specific URL Manipulation

  1. Understand what URL manipulation is. If you haven't visited the specific URL you want, but you've visited similar URLs, then you can call up the similar URL and edit it by hand. If you frequently use a particular website, it may be worth trying to understand the URL structure of the website so you can navigate it more easily by editing similar URLs.
  2. Consider the following examples and generalize to your own case.
    • Example from GitHub: Suppose you have visited the URL https://github.com/jgm/pandoc/blob/master/doc/lua-filters.md before. Then you can type in the address bar lua filters to call up this stored URL. If you then want to see the version history of this file, you can change the blob to commits. If you want to see other files in the same directory, you can delete the filename lua-filters.md and change the blob to tree. In both of these cases, you can first visit https://github.com/jgm/pandoc/blob/master/doc/lua-filters.md and then click on a link on that page to navigate to the other pages. However, manipulating the URL will allow you to get to your destination without first loading the original page.
    • Example from Wikipedia: Suppose you want to see the revision history of a particular Wikipedia page, X. Suppose also that you have visited at least one revision history page for a different Wikipedia article, Y. Then you can type wikipedia history in your address bar to call up https://en.wikipedia.org/w/index.php?title=Y&action=history, then change the Y to X to get https://en.wikipedia.org/w/index.php?title=X&action=history.

Using Site-Specific Search

  1. Understand what site-specific search is. Site-specific search means searching inside a specific website by using the website's search box or using the site: operator on a generic search engine. If you cannot remember a word that appears in the title or URL of the page you are looking for, then the address bar/history search approaches don't work. In this case, if you happen to remember a word that appears in the body of the page and you remember the website it was on, then using a site-specific search can be a good idea.
  2. Figure out if the website has a search box. Note that some websites have search boxes that function poorly.
  3. Try typing in some words and hitting if the website has a good search box. Some search boxes support advanced features like Boolean operators, so you may want to check for these.
  4. Try using a generic search engine with the site: operator if the website doesn't have a search box or only has a bad search box. For example, typing site:en.wikipedia.org the pillows on Google will search for the string the pillows on the domain en.wikipedia.org (i.e. the English Wikipedia).

Using the History Database

  1. Understand what the history database is. On your computer, both Chrome and Firefox keep a SQLite database of your browser history. This means that if you are already familiar with databases, you can work with your browser history in the same way. For example, you can list all of your history, filter through some subset of your history according to arbitrary criteria (e.g. substring match, fuzzy search, regular expressions), and programmatically process your history.
    • Working directly with the history database takes some preparation, in terms of locating the database, learning the structure of the tables, and looking for or writing custom tools. Therefore, most users will probably not want to do this.
  2. Understand the following example to see if you can generalize to your own case.
    • An example of using the Chrome history database is Junegunn Choi's article "Browsing Chrome history with fzf".[3] This article describes the steps for writing a shell function that queries the history database and searches the whole history using a fuzzy finder called fzf. The upshot is that one can type a command ("c" in the article) at the terminal to search through one's entire Chrome history using fuzzy search and open the found URL using Chrome.

Using a Full Mirror of the Content

  1. Understand what a full mirror of the content is. A full mirror of a website's content means downloading the whole website onto your local computer. If you need to repeatedly search the same site, you may want to consider making a full local mirror of the website content (or some subset of it). This is especially the case if the site has a bad search box and cannot be searched by a search engine. The article How to Archive Websites on Unix Like Systems covers some considerations for how to mirror a website.
  2. Understand the following example situations and generalize to your own case.
    • You frequently work with a specific repository on GitHub. Since GitHub repositories can easily be cloned, you can do this once and search through the repository using standard tools like your text editor/IDE and grep.[4]
    • You want to search through a personal archive, like your Gmail or Facebook Messenger messages, where the content is not public. These services often have a feature to export your personal content. Once downloaded, you can search through the results locally.
    • You want to search through the contributions of a particular user on a website, but the website's search function doesn't allow you to filter by author. In this case, you can download all of the contributions of the user, then search locally.

Understanding How the Omnibox Works (Chrome)

  1. Understand the difference between Chromium and Google Chrome. This section talks about Chromium rather than Chrome, because the latter is based on the former and only the source code for the former is publicly available.
    • For the purposes of quickly navigating to a particular URL, probably the most important takeaways from the way the omnibox works are: (1) a URL is suggested only if there is a match at a word boundary for at least one word you typed; and (2) the omnibox doesn't search all of your history, so if you can't find something that you know you've visited before, going to history search is a good idea. The rest of this section looks at the omnibox in more detail.
  2. Understand the basic terminology used when talking about the omnibox.
    • A provider gives suggestions to the omnibox. There are various providers, each giving a specific list of suggestions given some input (or no input). In the Chromium source code, each provider is an AutocompleteProvider.[5]
    • Two providers give history suggestions. These are HistoryURLProvider[6] and HistoryQuickProvider[7]. The former specializes in giving suggestions based on prefix matches for a URL. The latter can give suggestions based on non-prefix matches, and also matches words in the title.[8]
  3. Understand the conditions required for a URL to appear as a suggestion for each provider.
    • For both HistoryURLProvider and HistoryQuickProvider, URLs are suggested only if visited in the last 3 days or visited at least 4 times or typed at least once.[9] In particular, this means that the omnibox doesn't search through all of your browser history. This also means that you can make sure a page is suggested in the omnibox by visiting it once via the omnibox or by repeatedly clicking through to it.
    • For a result to be suggested in the omnibox, each word must match somewhere in the URL or title.[10] In addition, at least one word must match at a word boundary (e.g. after a dot or dash or space).
    • There are some exceptions to the above: when the browser session length is longer than three days and you have visited the URL more than 3 days ago during the current session, the page can still be suggested even if it doesn't meet the "visited in the last 3 days or visited at least 4 times or typed at least once" condition. In addition, HistoryURLProvider can suggest a URL that hasn't been visited if you have visited a subpage of an intranet host.[11]
    • The constants that modify the behavior of the history providers are all hard-coded in the source code (they don't seem to be modifiable in the preferences). This means that if you don't like their behavior, you can just change the values of these constants and recompile (if you use Chromium).
  4. Play around with the Omnibox Debug Page to build intuition.
    • Visit chrome://omnibox/ in Google Chrome.
    • Type text and hit or click .
    • Search results will appear for what would be suggested in the omnibox.
    • Checking the different boxes like "Show all details" and "Show results per provider, not just merged results" will toggle the results to show more details.
  5. Understand how incognito mode and the main browsing interact.
    • Pages visited through the main browsing are available as suggestions in incognito mode (as long as the pages meet the regular requirements above), but pages only visited through incognito mode will not be available as suggestions, even in incognito mode.
  6. Consider turning off search engine suggestions for the omnibox. In preferences, there is an option called "Use a prediction service to help complete searches and URLs typed in the address bar". Turning this off means more results from your history will show up in the omnibox because your history results are no longer competing with the search engine suggestions for spots. However, turning this off means not seeing any search engine suggestions.

Understanding How the Awesome Bar Works (Firefox)

  1. Understand what the frecency algorithm is. Firefox uses a frecency algorithm (a combination of "frequency" and "recency") to rank results in the Awesome Bar.[12][13]
  2. Consider the following questions. There are some remaining questions about this algorithm that are unclear:
    • The frecency algorithm seems to only affect the ranking of the results, rather than which URLs to rank in the first place. Must all words match at a boundary?
    • Does it search through the whole browser history, or only some subset (like in Chrome)?
    • How does the frequency and recency interact with the string match quality? For example, it wouldn't make sense to rank highly poor string matches, even if such a page is visited more often.
  3. Understand how private browsing and the main browsing interact.
    • Pages visited through the main browsing are available as suggestions in a private browsing window (as long as the pages meet the usual requirements), but pages only visited through private browsing will not be available as suggestions, even in a private browsing window.

Related wikiHows

Sources and Citations