. . NEWS ALERT

5/09/08 -  If you have  a Windows XP  PC that uses an AMD chip, you should read this article before updating to  Service Pack 3  (SP3) .  Some  systems are having reboot issues.
Home arrow Useful Utilities arrow Free arrow Add IE Search Prefixes with TweakUI
Add IE Search Prefixes with TweakUI Print
Wednesday, 19 March 2008
One browser feature that gets little coverage belongs to Internet Explorer. In 2005, Microsoft added a feature called “IE search prefixes”. These shortcuts allow users to type a prefix & query and get answers from some of their sites. For example, you can type “define” and a word to get a listing of definitions. The good news is you’re not limited to just the ones Microsoft provided. I’ll show you how to edit or add your own search prefixes for other sites if you use Windows XP.

The Original IE Search Prefixes

The initial set of prefixes included only Microsoft properties. To get these shortcuts, you need to download the search prefixes Microsoft script. You can install the script by clicking the saved IE_Search_Prefixes.MSI file. This script file includes shortcuts for:

  • Definitions and synonyms
  • Encarta lookups
  • Image search
  • Microsoft Knowledge Base articles
  • Microsoft.com search
  • Movie reviews
  • MSDN search
  • MSN music search
  • MSN news
  • MSN shopping
  • MSN Money quotes

Note: you can create search prefixes without downloading this script.

In each case, your query was answered by a Microsoft property in short order. You didn’t have to type as much info or navigate to the website. For example, I could type “news tibet” and see current news items from MSN.

At some point, you want to edit or add your own scripts. For example you may not want to type “define evapotranspiration” if you could shorten the prefix “define” to “d”. Or perhaps you would prefer using the Wikipedia as a source.

How to Edit an IE Search Prefix

To edit or add a search prefix, you need another piece of software that we’ve mentioned before called Microsoft Tweak UI utility. This is one of the Microsoft Power Toys. The catch is I’m not aware of a version that works with Microsoft Vista.

To edit a search prefix URL,

1. Download and install Tweak UI. There is a link to the program on the right side of the Microsoft page for TweakUI.exe.

2. Open the TweakUI program. It may be listed under Start |All Programs | PowerToys. The path is (C:\WINDOWS\system32\TweakUI.exe). A Tweak UI dialog should open.

3. Click the + sign before Internet Explorer.

4. Select Search from the subcategory.

TweakUI-Search-Prefix-section
Click to enlarge

In the right section, you should see a list of installed search prefixes. Your dialog will look different than mine since I’ve added some.

5. Click the entry you wish to edit. I’ll select encarta.

6. Click the Edit button.

Edit-URL-string-for-search-prefix
Click to enlarge

The Search Prefix dialog opens and allows you to change the URL. You’ll note the Prefix: section is grayed out. Sadly, you can’t edit the prefix section of an existing entry.

7. Enter in the new URL for encarta. (Sometimes the original URLs can change for many reasons.) In our case the new Encarta URL is:

http://encarta.msn.com/encnet/refpages/search.aspx?q=%25s&FORM=IESHRT

8. Click OK.

In IE, you can now type “encarta” space and your search phrase in the IE address bar and it will do a look up on that phrase in Encarta. As example “encarta electoral college”.

Personally, I like short prefixes and “encarta” is long. To solve this issue, create a search prefix with your short prefix code and paste in the above URL for Encarta. This is similar to what Microsoft did on their default entries. You’ll notice they have the same query, but with different prefixes like “define”, “definition” and “dictionary”.

How to add a Search Prefix to IE

While you might like Microsoft, you may not want to use them for all your search prefixes. This is where TweakUI allows you to create your own. In this example, I’ll build a search prefix to use Wikipedia as the source.

To add a new search prefix,

1. Go to the Wikipedia site http://wikipedia.org/

2. Enter in a query such as “electoral college”

3. Notice the URL for your results. You see a /wiki/ followed by your query terms.

Example-of-URL-with-query-parameter
Click to enlarge

4. Open Tweak UI.

5. Navigate to Internet Explorer | Search.

6. In the Search Prefixes box, click Create.

7. In the Prefix: textbox enter your code for the wiki. I prefer short codes, so I’ll use “wi”

8. In the URL: box paste in your URL from your preceding search.

9. Replace your search phrase such as “electoral college” with %s. (Your entry should look like http://en.wikipedia.org/wiki/%s )

10. Click OK.

11. Click OK.

To test your new search prefix, open IE and type wi electoral_college in the address bar.

Note: In the case of Wikipedia they use an underscore to separate words in a query. In other sites such as Lifehacker, you don’t have to worry about this as they use a + sign.

What Sites are Good for Search Prefixes?

I wish I could say this feature worked everywhere, but it doesn’t. Certain sites are better than others. Here are some guidelines I use.

1. You frequently use the site, but not for the same information. For example, I’ll query Wikipedia for a number of items, but rarely the same one twice.

2. When you do a search the resulting URL has to show in your search query. Some sites such as http://thomas.loc.gov/ maintain the same URL when you search for legislation.

3. The site search doesn’t need you to enter many variables for your search. As example, a car site might want you to set make, model, year, number of doors and so on. Sometimes, you can find a way to make the prefix worked. For example, when I search Boorah for restaurants, my location stays the same, but my food choice differs. I built a prefix which maintains my zip code and my food preference is the search variable. (Replace X with your zip code)

www.boorah.com/restaurants/RestaurantSearch.do?restaurantName=%s&restaurantLocation=X

This query allows me to type things like:

boorah japanese

boorah italian

4. The URL that is generated from your search query isn’t so long that it needs its own zip code. Some sites set so many parameters that the URL becomes cumbersome. The sites that work best are ones that add your query to a base URL. As example, www.domain.com/search/your+phrase.

5. The site doesn’t use Google custom search. I like Google custom search and use it on this site. However, if you enter in a URL from a query using Google custom search, you get an error that reads “The search string can contain at most one occurrence of %s.” This is returned even if my URL only has one instance of %s.

6. The site doesn’t require a login.

Tip: On some sites, I've found it helps to use Firefox's keyword search bookmark to identify the URL string and then edit the %s variable.

Example Search Prefixes

Below are some search prefixes I’ve built that you might use. You can copy and paste the URL string into TweakUI and rename to the search prefix to suit your needs.

Search Prefix

URL string

Sites

wi

http://en.wikipedia.org/wiki/%s

Wikipedia

lh

http://lifehacker.com/search/%s

Lifehacker

dt

http://whois.domaintools.com/%s

Domain Tools

ma

http://www.mahalo.com/%s

Mahalo

gn

http://news.google.com/news?q=%s

Google News

ya

http://answers.yahoo.com/search/search_result;_ylv=3?p=%s

Yahoo! Answers



Related Browser Tutorials

Search Firefox with Keyword Bookmarks

Last Updated ( Thursday, 27 March 2008 )