Help spread the “search://” meme!

How often do you find yourself writing an email in which you tell someone to do an Internet search? If you do it often enough, you’re probably familiar with the following cycle, the one that starts with you saying:

Just Google for “there will also be corn served”.

Then you realize it’s unclear whether or not you meant a phrase search — that is, whether the double quotes are part of the search string, or just there to separate the search words from the rest of your email. So you add:

Make sure to include the double quotes!

Then you remember that your friend works at Yahoo and always gets annoyed when people equate searching on the Internet with Google, as though there were no other search engines in the world. With a sigh, you go back and edit the text to be service-neutral, turning it into one sentence while you’re at it:

Type “there will also be corn served” into your favorite search engine, and make sure to include the double quotes.

Gosh, what a lot of work just to tell someone to search for a six-word phrase. And the recipient still has to manually cut and paste the phrase into a search engine, aiming the mouse carefully so as to catch the double quotes. There’s got to be an easier way!

Introducing search://

Most people, if they saw the following in an email, would know what to do:

search://"there will also be corn served"/

It means “Go to your preferred Internet search engine and enter the string of text between the second and third forward slash, exactly as written here.” It works for non-phrase searches too:

search://thumbnail image dimensions standard/

And for combinations of word- and phrase-searches

search://tommy's tequila "san francisco"/

Note that it’s not actually a URI, so it need not obey the URI syntax rules (which involve, among other things, special sequences to represent spaces and double quotes). You can just write the search string exactly as it would be entered in the search engine’s text box. The search:// syntax takes advantage of two convenient facts:

  • All the major search engines support the same basic search string syntax, e.g., using double quotes for phrase searches.
  • “/” isn’t normally used in search strings anyway (the search engines don’t track forward slashes, although they do remember that there’s a word boundary there), so we’re free to use “/” for the delimiters around the search string.

This syntax is both human-readable and machine-parseable. The former property is crucial, because you want people to know what you’re telling them to search for before they do the search. The latter property is also crucial, because it means software can automatically recognize a search description and Do The Right Thing when you click on it (namely, take you to whatever search engine you’ve configured as your preference, enter the search string into the input box, and submit the form). “Software” means web browsers, of course, but also mailreaders and all other text-reading environments.

I’ve already starting using this syntax in email messages, and in one case even on a poster. So far everyone seems to understand it right away; that is, no one has asked me what it means, and several people seem to have done the suggested searches. Once this syntax is widespread, I expect software support to emerge organically, as happened with email addresses, with http:// syntax, and many others. When something useful is machine-parseable, software is usually quickly adjusted to recognize it.

Confidential to J. Random Hacker:

You’re probably thinking “But this isn’t even compatible with URI generic syntax as defined in RFC 3986.” That is correct. It’s not a URI. In addition to the tolerance of double quotes (which can never appear unencoded in a URI), the spaces need to remain unencoded anyway, because the string has to be comprehensible to humans. It may seem counterintuitive to use a syntax so similar to URI syntax, but there are good reasons for doing so. Nothing else would have the immediate comprehensibility of search://, because many people are now accustomed to the general format foo://bar/, and will intuitively grok what this new syntax means. I spent a fair amount of time trying come up with something better, and couldn’t. If you can, let me know… But it’s probably already too late: I’ve set the meme loose, and no one can control it now. Mu-wa-ha-ha-ha-haaaaah.

6 Responses to “Help spread the “search://” meme!”

  1. Fitz Says:

    I just use [] around what you should search for. For example:

    [there will also be corn served]

    or

    [“there will also be corn served”]

  2. Karl Fogel Says:

    Yeah, I’ve used that in the past too. Two problems with it: one, you still have to write text saying to do a search (so you’re still typing more words, and figuring out how to phrase it each time — do I say “Google” or “your favorite search engine”, etc?), and two, it’s not automatically parseable as a search, because so many other things can be surrounded by square brackets too. Thus, software support can’t evolve as easily.

  3. David Carlton Says:

    Why can’t I use %22 to represent double quotes? I haven’t read the entire RFC in detail, but section 2.1 makes it seem like percent encoding can be used with arbitrary binary data.

    Not clear to me whether or not search:// is better than search:/ – I’d have to think about that.

  4. Karl Fogel Says:

    I think I was wrong, and that you can encode double quotes — I misread the spec. You just can’t include a double quote literally in a URI. It differs from those characters which can be included unencoded when used for their reserved purpose, but which must be encoded when included for any other purpose. Double quote isn’t a reserved character, it’s simply a prohibited character: it can’t ever be present unencoded.

    Thanks for probing, David. I’ve corrected the text now, so your question will probably seem odd to future readers. But we’ll know what you meant :-).

    The reasons I prefer “search://…/” to “search:/…/” are one, that people are used to it and know how to skip over the first pair of slashes, and two, that the two slashes makes a much better visual boundary anyway (you don’t need it on the trailing end because you have a space to help you out there, plus the reader has already gone into the right “parse state” for the situation by then).

  5. Jesse Hogan Says:

    I never find myself needing to tell someone to search for something; I guess I have different computer using habits. I usually just send the link of the page I want them to look at or, if I want them to see a Google search result I would send them the Google URL (with the search query parameters of course). If I had a friend who worked at Yahoo I would send them a Google link. Sorry to get off topic but Yahoo is dead to me given their recent behavior.

  6. Karl Fogel Says:

    (Responding to Jesse.)

    I often recommend to people that they do a search, and I see others recommending the same. But I hang out on open-source user support lists, where this is common. Often there isn’t just one page you want to send someone to, rather it’s a matter of giving them the search terms they need and letting them filter the results.

    The problem with sending a Google URL is readability — it’s URI encoded, so all the spaces and quotes look funny. Techies are comfortable with the encoded form, but normal human beings aren’t.

Leave a Reply