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
- llm cmd undo last git commit - a new plugin for LLM - 26th March 2024
- Building and testing C extensions for SQLite with ChatGPT Code Interpreter - 23rd March 2024
- Claude and ChatGPT for ad-hoc sidequests - 22nd March 2024
- Weeknotes: the aftermath of NICAR - 16th March 2024
- The GPT-4 barrier has finally been broken - 8th March 2024
- Prompt injection and jailbreaking are not the same thing - 5th March 2024
- Interesting ideas in Observable Framework - 3rd March 2024
- Weeknotes: Getting ready for NICAR - 27th February 2024
- The killer app of Gemini Pro 1.5 is video - 21st February 2024
- Weeknotes: a Datasette release, an LLM release and a bunch of new plugins - 9th February 2024