Monday, May 07, 2007

Smart Search tip for FireFox users

I know what some of you are going to say, "Dude! You and Firefox? I thought you were an Opera Die hard." I admit, I have finally switched to Firefox from opera. Whatever the reasons, I don't want to spark another one of those famous browser wars here.

Today's stuff is about smart searching. When you want to search something on a site you have to open the website's search page and then type in a query. That means u gotta see the same ol' page each and every time. Modern browsers have those little search bars to avoid loading the search page and take you directly to the search results.

Here, I will show the way to add your favorite websites to that search box in Firefox. I will use MSDN search as an example here. You have to first find out the search URL for the site. for that you simply open the website, put in a search query and reach the result page. Copy the resulting URL from the address bar.

Like if I search 'HELLO' on MSDN i get -

Lets' analyze this URL-

  1. Locate the query string is ('HELLO' in this case is at the end like 'query=HELLO') If you change 'HELLO' to something else and press enter you will see that the results are changed appropriately.
  2. There are two parts in the URL. One is the search template and the second is the list of parameters after that URL.
  3. The search URL is ''. i.e the part before the first question mark.
  4. The Parameter List is "brand=msdn","locale=en-us","query=HELLO" i.e after the question mark.
  5. In the parameter list there are parameter/value pairs, each separated with a ampersand.
  6. Notice in the parameter list there will we a param/value pair in which the value is the search query. i.e "query=HELLO"

So, the total data we have is-

  • Name of site=MSDN
  • Description=MSDN Search
  • Search template=
  • Parameters-
    • brand=msdn
    • locale=en-us
    • query=HELLO
  • Search Parameter whose value we need to change=query.

Now the procedure to add this to firefox is-

1. Create a XML file in [firefox install folder]\searchplugins . i.e MSDNSearch.xml

2. Use the template
<searchplugin xmlns="">
<shortname>[Name of site]</shortname>
<url type="text/html" method="GET" template="[search template]">
<param name="[Param1]" value="[Param1Value]">
<param name="[Param2]" value="[Param2Value]">
<param name="[Search Param]" value="{searchTerms}">
3. Fill the values. (MSDN example)
<searchplugin xmlns="">
<description>MSDN Search</description>
<url type="text/html" method="GET"
<param name="brand" value="msdn">
<param name="locale" value="en-us">
<param name="query" value="{searchTerms}">
4. Save the file and restart firefox.

5. Now select the item from the search engine list and type in a query to test.

Another example using TorrentSpy -

<SearchPlugin xmlns="">
<Description>TorrentSpy Search</Description>
<Url type="text/html" method="GET" template="">
<Param name="query" value="{searchTerms}"/>

Happy Searching...

1 comment:

  1. so u left Opera fan club .....I too feeling sucked in Opera its sluggish on flash websites ! nice trick i ll try now :-)