SessionRestoreAPI
Jump to navigation
Jump to search
Please comment in the Talk page (use the Discussion tab above)
Goals
- Provide the ability for extensions to easily store and retrieve data across browser sessions.
- Provide mechanisms for extensions to build additional features on top of the existing infrastructure.
Use Cases
- Session Managers - Extensions that allow users to save and restore named sessions.
- Storage and Sync - Provide easy access to serialized, or serialize-able session data for extensions that want to backup the data, store it remotely, or share it with other applications.
- Selective Restore - Enhance the restore dialog to allow the user to filter what gets restored when the browser starts.
Requirements
- Configuration (instead of modding prefs directly)
- Ability to get and set the session state.
- Use JS objects instead of forcing a given serialization format.
Implementation
XXX Much of the API for get/setting state etc is already implemented in rough form, just needs to be cleaned up and exposed.
Open Issues
- See if client-side storage impl can be used or repurposed for extension storage.
- Between mozStorage and client-side storage, are the needs of the use-cases met? is raw mozStorage access enough?
- It might be interesting to impl this in a thin layer on top of mozStorage which exposes a memcache-ish get/set/replace API.