# Session Storage API

## Overview

Session Storage API is a part of Web Storage API which allows web apps to store data locally as key/value pairs within the browser's storage.

The data stored using Session Storage API is non-persistent - ie, the stored data in a particular tab is not accessible to other tabs of the same origin, and it gets cleared from the storage if the tab is closed.

## Demo

<https://nectar.website/demo/web-apis/session-storage/>

## Usage

You can refer to the code present in `/partials/web-apis/session-storage.html` file and use it accordingly.

## Reference

<https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pmsgz.gitbook.io/nectar/advanced/web-apis/session-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
