Nullifying Precipitation Machine


    1.0.4 • Public • Published


    uHistory is a Javascript library for tracking all browsing history. That means, save all page the user visit, with time in page, datetime and url.

    Ex. This works for apps that need get history of user before offer support in realtime.

    uHistory is totally compatible with SPA (single-page application).

    This is not a replacement to Google Analytics or similars.
    Is a complement for track users and get history in realtime during active session.
    Ex. User request a new chat -> Get history -> Send to agent

    This library can be complemented with a xDebugger!

    This library was designed for Videsk™ :)


    • Save all visited page
    • Track time in page
    • Get datetime when page was visited
    • Persistent history in localstorage (optional)
    • Compatible with SPA or AJAX load
    • LZ UTF-16 compression to history
    • Protected access directly from session or local storage


    Via NPM

    npm i @videsk/uhistory

    or in body

    <script src="../uhistory.min.js"></script>

    Use minified version in production located in dist/ folder.

    How works

    Not persistent history (only during session)

    const history = new uHistory({});

    Persistent history (localStorage)

    const history = new uHistory({ persistent: true });

    Get history

    For get all history only need execute:

    // Output
    // { history: Array, ua: String, lang: String }

    The output it's composed of the follow keys:

    • history : Array with all visited pages
    • ua : String with User-Agent
    • lang : String with the main language of browser

    Schema of history

        history: [
                url: '', // Page visited
                time: 12345, // Time in page in milliseconds
                date: 1568777632096 // Timestamp when page is loaded

    Stop to tracking

    For stop to tracking only need execute history.stop();. This clean all data in store and stop all intervals.

    Custom key for store

    If you want save data with other key in local or session storage only need set before to initialize.

    const history = new uHistory({ key: 'my-custom-key' });


    This library is totally open source with Apache 2.0 license, but was designed for Videsk™ products.


    npm i @videsk/uhistory

    DownloadsWeekly Downloads






    Unpacked Size

    70.2 kB

    Total Files


    Last publish


    • noheliajoeliana
    • matiaslopezd