JS


1 year ago
18 April 2010.

<3 ya Google Chrome.

Like most browsers today, Google Chrome has an interactive address bar that can, among other things, let you quickly execute search queries with a simple keyword specifying which search engine you’d like to use. Turns out, Chrome is smarter (and a little more alive) than most.

I was recently surprised to find that Google Chrome seemed to not only recognize the usual search engines/reference sites, but also the user/community-based knowledge search 지식iN from Korean search portal Naver.

The basic feature was nothing new, keyword-based macros for the address bar have been around since Mozilla in my experience. (Yes, yes, Opera probably had it first.), but seeing Naver or 지식iN included without adding it manually was surprising. Side note, Naver is probably the most popular search portal in Korea. But when this wouldn’t work for a friend, I did a little tinkering and found out there was a little magic going on behind the scenes. First to investigate: What happens if I delete my history?

Then… Voila, no more auto-complete!

And if I do a search normally and thus IMPRINT (okay, all I’m doing is creating an entry in the history)

Look.

It’s back!

Select or just press tab.

Turns out, Google Chrome does keep a list of search engines with customizable keywords. And, unbeknownst to me, has been slowly growing it by simply observing my browser history and I suppose doing some sort of simple matching on the URL string.

And now, at the bottom, our newest member, 지식iN (지식 = Knowledge, thus the K).


Further tinkering with Mr. Josh Kim and it seems the matching occurs in either one or the combination of these two factors, possibly among others:

  1. The URL string has a pattern of the search query parameter in the URL. I.e., \b[?&]+\w=[A-Za-z0-9_%] or something to that effect. Cases like the example “http://thesite.com/search/mySearchTerm” may not work unless/even with the next condition:
  2. A form submission that can be identified as a search box. (As a requirement or just coincidence, every experiment that ended with Chrome identifying the search had the search box with term filled in on the results page.)

A little bit more tinkering:

  1. There seems to need to be a submission. Deleting a search engine entry and simply copy-pasting a URL to a search query or clicking such a link in the browser history does not result in Chrome automatically an entry in the search engine list.
  2. For search forms with multiple parameters (text input boxes), Chrome will not mistakenly take one or the other for a singular keyword query and add it to the search engine list.

P.S., more love: I don’t know if it’s tumblr or Chrome awesomeness, but after closing this post edit tab accidentally and reopening the closed tab, not a single character was lost.


Archives