A couple years ago I was shadowing another department at my job. The person who I was shadowing that day, taught me about creating bookmark shortcuts using Keywords in Firefox. Of all the things that I learned that day, this had to be the most useful. This works for any version of Firefox and with sites which have a search function and displays the search string in the URL. For this article, I will use Mozilla’s Bugzilla site as I go there quite frequently to look-up Firefox and Thunderbird bugs. There are many cases in the Firefox and Thunderbird Build forums, posters will reference bug numbers but don’t provide a link. In that case there are several steps involved just to get to that particular bug:
- Open a new tab
- Go to the Bugzilla Site (https://bugzilla.mozilla.org/)
- Paste the bug # into the box and click search
But what if you could do the above three steps, in one step right from the Firefox address bar? I have created a bookmark shortcut in Firefox where all I have to do is type in the address bar bug followed by a space then the bug # and it takes me right to that particular bug’s page. So let’s say I wanted to look up the info for bug 595053 (support for 32-bit plugins in Windows 64-bit Firefox) all I need to do is type bug 595053 and press enter. This will direct me to the following address: https://bugzilla.mozilla.org/show_bug.cgi?id=595053
Notice the portion I highlighted in blue above. This is what I was referring to by having the search query in the address. The reason I made the bug # portion bold is because no matter which bug you are searching for, this is the only part of the address that is going to change. This is the variable (more on this in a bit). Below is the bookmark shortcut I have created for Mozilla’s Bugzilla.
- Name: Name of the bookmark. This can be whatever you want.
- Location: This is important, you will notice the Bugzilla search address URL that I had discussed earlier. However, if you look carefully you will see instead of a bug number at the end, I’ve put %s instead. This tells Firefox to insert the variable (your search term) into the address.
- Keyword: What you will type in the address bar followed by what you are wanting to search.
So with this shortcut in place above, I am looking up Bug #515037. In a new tab, I have typed bug 515037 in the address bar. You will see in the results box Firefox knows the keyword (in this case bug) is associated with the bookmark for Mozilla’s Bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=%s). It also knows this bookmark has a variable (in this case 515037). Putting it all together Firefox opens the address: https://bugzilla.mozilla.org/show_bug.cgi?id=515037
Tip: You can also create a keyword bookmark shortcut for our Blog’s search feature. When you are creating the bookmark you will enter into the location field: http://blog.ffextensionguru.com/?s=%s and then choose the keyword of your choice. Now you will be able to search the blog without first having to go to the blog.