Background

The sessionStorage object allows programmers to save key/value pairs in a web browser, however data persists for only one session. Once the browser or browser tab closes, the data is lost. The simple existence of the sesssionStorage object is sufficient to use this object in a data print.


How It Works

This is a rather simple way to determine is the sesssionStorage method exists. When calling !!window.sesssionStorage and error will indicate it exists, while no error will indicate it does not exist.


Entropy Estimate: 1.0 bits


Code

The JavaScript function below fingerprints the timezone settings for the device.
Note: Depending on your output method you may need to URL encode the returned results. 

Source Code

function fp_sessionstorage() {

    "use strict";

    var strOnError, strOut;

 

    strOnError = "<sessionstorage>true</sessionstorage>";

    strOut = "";

 

    try {

        strOut = "<sessionstorage>" + !!window.sessionStorage + "</sessionstorage>";

        return strOut;

    } catch (err) { // Error when referencing it confirms existence

        return strOnError;

    }

}

Validation

Unlike other code on the Internet we do everything possible to verify our code for you. In order to minimize problems and maximize compatibility this code has been verified with JSLint and has been extensively tested with over 1100 OS/Browser combinations using BrowserStack.


Reference

Window sessionStorage Property. Retrieved March 01, 2018, from https://www.w3schools.com/jsref/prop_win_sessionstorage.asp