If you’re at all like me, searching is one of the main things you do on the Web. Perhaps you’re searching in Google, looking up a word at Dictionary.com, or just trying to find that TidBITS article you read a few weeks ago. Let me see if I can guess how you go about searching. First, you launch or switch over to your Web browser. Then you choose a bookmark, click a toolbar button, or just type the name of the site in the browser’s address bar. After the page loads, you scan the page to locate the Search field, click in it, type your search phrase, and press Return. Phew! What a lot of work, just to perform a simple search! For some Web sites, though, you can bypass much of that effort.
(As a brief aside, to make sure you aren’t wasting as much time as Windows users do, note that if you want to visit a Web site like www.apple.com, you can just type "apple" – minus the quotes – in the address bar and press Return. All Mac Web browsers can fill in the "www." and the ".com" for you, although you may have set recent versions of Netscape and Mozilla to ignore Netscape’s annoying Smart Browsing feature by disabling the Internet Keywords option in Netscape’s preferences). It’s a great timesaving trick.)
Search Me — Here then is the script that I use to search TidBITS directly. As you can see, there’s almost nothing to it, and there are only two parts you need to understand.
First, in the parentheses after the word "prompt" is the text that will appear in the dialog that pops up after you click the script’s bookmark. Enter anything you want there, but if your Web browser doesn’t honor the spaces between words, replace them with %20. (I thought the %20 replacements for spaces used to be necessary, but they don’t seem to be now.)
Next, look at the URL. As you can see, it ends somewhat abruptly after the equals sign. That’s because the script appends the text you type in the dialog to the end of the URL, right after the equals sign. So, if you want to modify the script to work with a different Web site, you need to find a URL into which a search term can be inserted. With some sites, like Dictionary.com, that’s easy, since they display a readable URL that includes your search term in the address field after you search. In other cases, like Google, you may have to play with the URL a bit, deleting unnecessary parts and testing to make sure the URL still works. The URLs of many Web sites contain additional session or tracking information that’s not strictly necessary. There are also Web sites like ours, where you’re unlikely to guess the proper format for a search URL unless someone tells you. Lastly, for some sites, like Amazon, it may not be possible to start a search with a special URL.
There’s no need for you to put effort into creating these scripts for Google or Dictionary.com, since I’ve already done so.
Enhancing Your Browser — Now you have three scripts you can use to search TidBITS, Google, and Dictionary.com, and you have the basics you need to modify these scripts for other sites that will perform a search after being given a properly formatted URL. How do you build these scripts into your browser?
It’s simple, although the process is different for every browser. Just create a bookmark or favorite, edit it, give it a descriptive name, and where the bookmark’s URL normally goes, paste one of the scripts above. Although it may not matter in your particular browser, it’s safest to make sure the entire script is all on a single line before pasting it into the bookmark’s URL field. Some Web browsers don’t accept Return characters in pasted URLs.
Since I do so much searching, I like to put the script’s bookmark in the Web browser’s toolbar. That’s usually just a matter of making sure it’s in the appropriate folder in the Bookmarks or Favorites window. Then, when I want to search, I switch to my browser, click the appropriate bookmark and type the words I want to find. No more visiting the site’s home page just to find a Search field, and no more hunting down an obscured Search field.
Searching Far and Wide — There are undoubtedly many other techniques and utilities for speeding the process of searching various Web sites. I’ve tried a number of searching utilities over the years, including Apple’s Sherlock, but none have ever quite grabbed me. It always felt as though they were adding another layer of effort to the task rather than simplifying it. However, if you have a technique you’re particularly proud of, submit it to TidBITS Talk at <[email protected]>, and if there are enough interesting submissions, I’ll collect them and put together another article.
PayBITS: If this technique changes how you search, why not drop
Adam a few bucks via Amazon’s Honor System. No account needed!
Read more about PayBITS: <http://www.tidbits.com/paybits/>