Gmonkey comes with some builtin functions to store data inside the Firefox profile for use across multiple sessions, logging, and handling AJAX requests (getting more information and inserting it into the current page, without actually loading a new page – partial updates)
http://wiki.greasespot.net/API_reference
Important functions: