Meteor Persistent Session

screenshot of Meteor Persistent Session

Modifies Meteor's Session to store variables in the browser's `localStorage`

Overview

Persistent-session is a game-changer for those utilizing Meteor, bringing much-needed reliability to the Session object. Unlike the default Meteor implementation, which loses session data on page refresh, this tool seamlessly saves session values using localStorage. It enhances user experience by maintaining continuity across navigations, ensuring that temporary disruptions don't lead to significant data loss.

By leveraging amplifyjs's store library, persistent-session accommodates users who depend on stable session data for their applications. With straightforward installation and easy-to-use methods, it is designed for both new and seasoned developers looking to enrich their Meteor projects with persistent session support.

Features

  • Easy Installation: Integrates effortlessly with existing Meteor projects that have the Session package installed by simply using meteor add session.

  • Multiple Session Types: Choose between temporary, persistent, and authenticated session variables to suit your application's needs, allowing for flexible data handling.

  • Object Support: As of version 3.3, set multiple session values at once using an object, streamlining the process greatly.

  • Automatic Deletion: Authenticated session variables clear automatically when a user logs out, helping maintain data integrity.

  • Update Capability: Effortlessly update existing session variables without needing to know their data type, offering convenience in managing state.

  • Default Settings: The setDefault() methods ensure that session variables are only created when necessary, avoiding unwanted overwrites.

  • Type Conversion: Easily change the type of a session variable using the provided commands, allowing for dynamic adjustments to your application’s needs.

  • Comprehensive Clearing: Complete control over session data with options to clear all variables or specific ones, keeping your data clean and manageable.