How to use dynamic bookmarks in Firefox
Bookmarks are quite useful as they allow you to save links to websites, applications and services in the web browser you are using so that you can re-open them easier without having to remember the address or page they were linked on.
While bookmarks may not be used as much anymore as they have been ten years ago, thanks to the rise of tabbed browsing and the sharing of sites on social networking sites, they are still essential parts of web browsers.
In fact, when Opera launched the new version without full bookmarking support in the beginning, it was one of the most requested features by the community.
Bookmarks are mostly associated with static links that point to specific domains or pages on sites, and less to a system that is more flexible than this.
The Firefox web browser supports variables that you can make use of to add a dynamic component to the bookmark.
We have described in the past how to use the feature to run searches on sites directly from the Firefox address bar.
But it can be used for more than that, for instance to open pages on websites dynamically without search. Instead of adding the pageÂ https://www.ghacks.net/category/firefox/ to the bookmarks of Firefox, you would make the "firefox" part of the address dynamic by replacing it with a variable.
While that prevents you from opening the Firefox page on Ghacks directly, it enables you to open other categories you are interested in with little effort.
Here is how it works in detail
- Open the Firefox Bookmarks Manager with the shortcut Ctrl-Shift-b.
- When the Library window opens, select a folder you want to place the bookmark in. Since you won't be opening it with a click but from the address bar, it does not really matter where you save it to.
- Right-click on the folder and select New Bookmark from the menu.
- In the menu that opens, add the following information:
- Name: A custom name for the bookmark. Pick any name you like.
- Location: the url of the bookmark. Replace part of the url with the variable %s, e.g. https://www.ghacks.net/category/%s/, https://www.reddit.com/r/%s/, or http://www.example.com/%s.html
- Keyword: select one or two letters for the keyword, e.g. gh for the Ghacks link or r for Reddit.
Once you have saved the bookmark, you may open urls on the selected sites by writing the keyword followed by the term you want the variable to be replaced with.
For instance, to open Ghacks' Google category, you would write gh google to load https://www.ghacks.net/category/google/ directly, and if you wanted to open the Email category, you'd write gh email instead.
This works only if the page exists of course and may result in 404 not found error messages otherwise.
The same method works on Reddit, Voat and any other site that separates sections on the site or individual articles with easy to remember names.
Now You: Have another tip? Feel free to post it in the comments below.
Really useful tip !
Once again, thank you Martin.
Thanks – exactly what I was
I’ll never use this
Disagree about bookmarks. I do not see the benefit of keeping multiple tabs open forever. Most of the time I have one tab open but when I’m reading a newspaper or perhaps downloading I may have multiple tabs open. When I close the browser I delete all history and all tabs. My bookmarks toolbar has my regulars and I search when I need others.
Using computers almost everyday since 1975 so maybe I’m old fashioned.
Cool tip. Thanks.
Hopefully, others have written about this too.
Even if they did so in the past.
Like, say, yesterday.
Y’know, there’s an easier way.
Just right-click any bookmark and select Properties. Then enter any Keyword you want to use to access that bookmark.
I found that I have to push shift+return to get firefox to use the %s trick else it would just search for the page in DuckDuckGo (my search engine). But this effect is probably due to one of my firefox addons.
So I can type: ghacks/firefox and then shift+enter and it goes right to http://ghacks.net/catagory/firefox
Martin, try out my new addon – https://addons.mozilla.org/addon/dom-element-as-a-bookmark?src=ghacks . With it, bookmarks deserve more to be called “dynamic”.
I’ve managed to get this working for thefreedictionary.com, DuckDuckGo and Wikipedia (with a little tweaking), but I simply can’t get it to work with Google.
Wiktionary does/doesn’t work for me depending on the location saved in the bookmark.
Originally the location was showing as https://en.wikipedia.org/wiki/Main_Page
Adding /%s after Main_Page doesn’t work. I then changed the bookmark location to https://en.wikipedia.org/wiki/%s and it works.
Btw, changing the bookmark’s location means that the bookmark no longer works, so if you still want to use a bookmark to get to Wikipedia you’ll need to create a new bookmark that uses the location https://en.wikipedia.org/wiki/Main_Page and give it a different name so you don’t confuse the two bookmarks.
I can’t get this to work at all for Google. I’ve changed my Google bookmark to https://www.google.com/%s (I don’t think the second forward slash is required after the s, but I’ve tried with and without a second one and neither works)
If I set the keyword to g and type “g missile” into the web address bar (without the quotes) and press Enter, then one of two things happens:
Either 1) https://www.google.com/missile/ is displayed in the address bar and I get an error message from Google saying that the requested URL was not found.
or 2) If a search engine other than Google is set as the default search engine in Firefox, then that search engine carries out a search for “goog missile”. Which isn’t very helpful.
I have no idea why %s doesn’t work with Google and I have no idea why 1 of 2 things can go wrong and there seems to be no consistency as to whether 1 or 2 happens. It seems totally random.
I have absolutely no idea what is going on here, I’m at a complete loss.
If anyone can explain what’s going on and how to fix it I’d appreciate it.
Oh and on a totally unrelated note: If I HAVE to tick the box relating to data storage before being able to post a message then don’t provide a tick box. Simply state that by posting a comment you’ll store my data. Appearing to give me an option when I have no option at all (other than not posting a comment at all) is insulting.
In Firefox you can add practically any site as a “one click search engine” (I’ve done this for Wikipedia, for example) — see the Settings page. This is practically the same as the bookmark trick, but better suited for search engines. You can manage this behaviour inside Firefox’ search settings. Not too sure why you’d use this bookmark trick for something like Google; I’d just use the search tools in Firefox.
Now, as for why your specific bookmark attempt is failing… As you noted “https://www.google.com/missile” is invalid; check this by searching for “missile” yourself and looking at your address bar. You want to be using a URL like “https://www.google.com/search?q=missile” — the other query parameters are all for tailoring your experience and are optional; operating system, browser, language, unicode support.
So your dynamic component would be the value of the “q” query string parameter: “https://www.google.com/search?q=%s”.
thank you so much ! very useful.