Dissecting the Google Firefox Toolbar
8th July 2005
Google have finally released a Firefox version of the Google Toolbar, with some nice praise for XUL in to the bargain. Of course, the most interesting part of the toolbar from a geeky point of view is the bit that queries Google’s servers for PageRank. Sure enough, if you download the google-toolbar.xpi
file, unzip it, then unzip the google-toolbar.jar
file within there’s a file called pagerank.js
with all of the juicy details.
To query PageRank, the toolbar makes a standard HTTP request to toolbarqueries.google.com
, with the page to query in a parameter along with a hash (presumably to discourage scraping). pagerank.js
includes the hash algorithm, with some amusing implementation details:
var GPR_HASH_SEED = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer.";
function GPR_awesomeHash(value) {
var kindOfThingAnIdiotWouldHaveOnHisLuggage = 16909125;
...
}
The spell check feature (spellcheck.js
) is interesting as well. When you click the “Check” button, the toolbar packages any content in form fields up in XML and POSTs it to http://www.google.com/tbproxy/spell. It get backs a simple XML document providing the offset, length and confidence for each spelling error along with a list of suggested alternatives. The user interface stuff is all handled by the extension.
If you want to watch the toolbar in action, I recommend the fantastic LiveHTTPHeaders extension.
More recent articles
- Qwen2.5-Coder-32B is an LLM that can code well that runs on my Mac - 12th November 2024
- Visualizing local election results with Datasette, Observable and MapLibre GL - 9th November 2024
- Project: VERDAD - tracking misinformation in radio broadcasts using Gemini 1.5 - 7th November 2024