How does the Chrome URL update complete?

I really enjoy using the Chrome URL bar because it remembers frequently visited sites and often offers a good ending based on what I typed and / or visited before. So, for example, I can enter ta URL in a string, and Chrome will automatically fill it in twitter.com, or I can type maps, and Chrome will fill in .google.com. This gives me the convenience of data-driven domain name labels without having to maintain an explicit list.

What interests me is how Chrome determines that the old shortcut should be replaced with the new one. For example, if I visit often twitter.com, then this becomes the end when I type t. But if I visit often twilio.comenough, then after a while Chrome will start filling it as the default for t. I cannot understand how and when this transition occurs. It also seems that there are (at least) two cases: one for domain names, and the other for path lines, because if I often visit a specific full URL and then want to get to the root of the same domain, I end up with Type the fully qualified domain name to force Chrome to ignore the completion of the full URL.

If I had to guess, I would suggest that Chrome stores what I type in the URL string in trie, whose values ​​are the number of times that a certain string was entered (and / or visited?). Then I would suggest that he has a kind of exponential decay model for the “calculations” in trie. But this is just an assumption. Does anyone know how this happens?

+3
source share
1 answer

Well, I found some answers by looking at the source code of Chromium; I would suggest that Chrome itself uses this code without much change.

- /URL- (, -, "Omnibox" ), Chrome , , . "", , . URL- .

, . , , ( , ). , omnibox, , , .

, URL- Chrome , , , , sqlite ( , , , , ). HistoryURLProvider , ASCII!

Sqlite

, omnibox sqlite SQL- URL- . URL-, URL-.

, ! , , .

, . URL- , , ( ?).

, , , sqlite , , Chrome , URL-. , , , .

. , Chrome.

+6

All Articles