In my last blog, I mentioned Chrome search engines, and how you can use them to make your address bar smarter. I had never noticed these in Firefox, but they're also there. Chrome makes them a bit more obvious (with the "Press TAB to search..." thingies), and adds them automatically for pages that you search on that are formatted in a way that Chrome can recognize, but they're there for all of us (well, except weirdos using IE or Safari; they might be there, too, but who would know?). These things are very useful if you have to poke around within a site a lot with just slightly changed URLs (I need to do this several times a day, loading different itemIDs in an author view or student preview), but they're also useful if all you want to do is search. Here's how they work.
- Create a new bookmark. It can be any page; we're going to edit it to make it what we want. Starting from Google for a Google-based keyword wouldn't be a bad idea, though, to get the favicon right.
- Click Bookmarks, then right click the new bookmark and choose Properties (or whatever the equivalent is on Mac).
- Change the Name to something to remember it by in case you need to edit it in the future, such as "Google Map Search" (or whichever one you might be setting up).
- Change the Location to the url you're going to search, with %s for the word or phrase you want to search on. To put that in concrete language and hopefully make it more comprehensible, let's do one of my favorites, "map" (for looking something up in Google Maps). We'll do a cooler version of this in a sec, but this is an easier place to start. For this one, your Location is http://maps.google.com/maps?f=q&hl=en&q=%s
- Most importantly, change the Keyword to something short to type, "map" in this case.
- Save changes.
- Right click the address bar, and choose "Edit search engines."
- Click "Add"
- The name, keyword, and url are the same as Firefox. The only difference is that Chrome will give you the "Press TAB" clue to let you know that you have a keyword setup with that name.
To use these things, type your keyword in the address bar, followed by your search (for example, "map 123 Fake Street, 78754". The page will load, with your search.
Note that these don't have to use search engines; any time you can fill in a phrase in a url to go to a page you're looking for, it works. It's hard to give you examples of that, since I can't show you the ones I use at work... but, well, for example, this one will load an xkcd comic by ID number:
- keyword: xkcd
- location: http://xkcd.com/%s
Typing "xkcd 526" in your address bar would then load one of my favorite xkcds, which you should keep around for reference.
Here are some others (note: in Chrome, I highly recommend just going to most of these pages and searching to get them into your list, and then editing the keywords; the url they grab has some extra trickiness that's neat, but I'm not going to sort out all of how those extra bits work):
- YouTube: you, http://youtube.com/results?search_type=search_videos&search_query=%s&search_sort=relevance
- Amazon: am, http://www.amazon.com/exec/obidos/external-search/?field-keywords=%s&mode=blended
- IMDB: imdb, http://www.imdb.com/find?q=%s
- Merriam-Webster: mw, http://www.merriam-webster.com/dictionary/%s
- Allrecipes.com: cook, http://allrecipes.com/search/recipes.aspx?withterm=%s
- Images.google.com: i, http://images.google.com/images?gbv=2&hl=en&q=%s&btnG=Search+Images
- Maps.google.com: map, http://maps.google.com/maps?f=q&hl=en&q=%s
And this brings me to my favorite: mapto. This one is slightly trickier. The easiest thing to do is probably to search for your starting address (I have this set as my work address for my work lappy, and my home address for my home desktop) using "map YourAddress," and then copy that string into this.
Here's an example, with 1600 Pennsylvania Ave NW, Washington, District of Columbia 20006 (the White House) as our starting address:
- Keyword: mapto
- Location: http://maps.google.com/maps?f=d&saddr=1600+Pennsylvania+Ave+NW,+Washington,+District+of+Columbia+20006&daddr=%s&hl=en
Notice the +'s; if you're careful, you could just change that to your address. You can actually shorten that a bit; for example, this would also work:
- Location: http://maps.google.com/maps?f=d&saddr=1600+Pennsylvania+Ave,+20006&daddr=%s&hl=en
Once you have that set up, you can type "mapto DestinationAddress" (for example, "mapto 1600 Pennsylvania Ave, 20006"), and a map from your starting address to that destination address will load.
Let me know in the comments if you have any other creative uses of keywords.
ETA: Be sure to check out the follow-up to this post, where I discover way cooler tricks.