Archive for May, 2005
Nutch and Bittorrent
Cool. The new bittorrent search engine uses Nutch.
Cookies and Contacts
As everybody and their mom has been talking about Greasemonkey and AJAX, I decided I had better get a piece of the action. I also had a growing annoyance with the state of MUAs. I was contemplating writing my own, however I’ve since realized that perhaps I can get what I want by using Greasemonkey to add features to Gmail. Persistent Persistent Searches is that first step. The bit of code that I wrote allows people to write Greasemonkey scripts that store data in a Gmail contact. I wanted it to be relatively secure, “nice” to Gmail’s servers, and easy to use. What I ended up with is something that stores data in the note field of a particular contact. The data resembles cookie data and can be used in a very similar fashion. In fact the note data is cached in a cookie. This is my attempt to be nice to Gmail’s servers. On initial login, the note data is downloaded from the contact and stored in a cookie. Any read attempts for note data actually just read the local cookie. Any write attempts change the data in the local cookie and on Gmail’s servers. Since this data is cached in a cookie, I was a little concerned with the expiration time of this cookie (so that other users on the same computer couldn’t see the cookie data). The pseudo-solution was that this cache cookie expires after 3 minutes. However, Gmail checks for new mail every 2 minutes. Each time this happens (and the same user is logged in), the cache cookie will be given another 3 minutes to live. In other words, this cache cookie will be around after the user logs out of Gmail for at most 3 minutes.
Persistent Persistent Searches
Introducing persistent searches in Gmail that are…persistent. First off, props to Mihai Parparita who did all the hard work for adding persistent searches to Gmail. I’ve added to Mihai’s script, so that the saved searches are stored in a special Gmail contact. Previously they were stored in a cookie. The advantages are two fold:
- You can access your saved searches (and only yours) from any computer as long as your browser has this script installed.
- Multiple people can use the same computer and browser while their saved searches remain separate and distinct from the other person’s.
Installation Instructions:
- Install Greasemonkey (only works with Firefox).
- Open up this user script (in Firefox).
- From the “Tools” menu, select “Install User Script..” and confirm all of the various prompts.
- Logout of Gmail and log back in.
FWIW, I hope to eventually add a few more unrelated features to Gmail via this script. For an overview of how my modifications work see my post on Cookies and Contacts.
Update: Gmail apparently changed a few things in their code this evening. I’ve updated one of the regex’s to work with this change. If you see that your saved searches aren’t being saved or restored properly, you’ll want to reinstall the script.
Update (December 1, 2005): The script has been updated to work with Firefox 1.5 and Greasemonkey 0.6.4.