I’ve never found the need for persistent searches in my email, but that doesn’t mean you guys haven’t. Here is a great tutorial by the persistent.info guy (a Google employee) that shows you how to setup persistent searches in your Gmail accounts.

The user script has a pretty straightforward implementation. It looks for the “Labels” box, and if it finds one, it inserts a “Searches” one. As previously mentioned, I store all the searches in a cookie. To actually perform a search, I created a an XMLHttpRequest object and use it to fetch the search results for each saved search. The response contains in it the total number of messages that matched the query. It would’ve been nice to use the DOM (and then a JavaScript eval()) to parse it, but this turned out to be more difficult than expected (XMLHttpRequest only provides a parsed DOM for XML documents).

Share and Enjoy

  • StumbleUpon
  • Reddit
  • Digg
  • del.icio.us
  • Facebook
  • TwitThis

Related posts:

Improved Outlook Searching
Gmail Adding Infinite Storage
Gmail Adds Contact Groups, Vacation Response
Very Dynamic Web Interfaces
Skinning GMail with a Custom Stylesheet

Hope you like that post!

Forever Geek is a resource for all things geek. You can stay tuned by having the latest FG news delivered to you for free via RSS.