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
- Slop is the new name for unwanted AI-generated content - 8th May 2024
- Weeknotes: more datasette-secrets, plus a mystery video project - 7th May 2024
- Weeknotes: Llama 3, AI for Data Journalism, llm-evals and datasette-secrets - 23rd April 2024
- Options for accessing Llama 3 from the terminal using LLM - 22nd April 2024
- AI for Data Journalism: demonstrating what we can do with this stuff right now - 17th April 2024
- Three major LLM releases in 24 hours (plus weeknotes) - 10th April 2024
- Building files-to-prompt entirely using Claude 3 Opus - 8th April 2024
- Running OCR against PDFs and images directly in your browser - 30th March 2024
- 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