# jquery-html5storage

> jQuery Plugin for Local Storage or Session Storage.

Latest version **1.0.1** (published 2018-03-04) · 0 weekly downloads

## Install

```sh
npm install jquery-html5storage
pnpm add jquery-html5storage
yarn add jquery-html5storage
bun add jquery-html5storage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-03-04 |
| First published | 2018-03-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 930 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gil Machado |
| Maintainers | fblade |
| Keywords | html5, storage, local storage, session storage, plugin |

## Links

- npm: https://www.npmjs.com/package/jquery-html5storage
- Repository: https://github.com/FBlade/html5Storage
- Issues: https://github.com/FBlade/html5Storage/issues
- npm.io page: https://npm.io/package/jquery-html5storage

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2018-03-04
- 1.0.0 — 2018-03-04

## README

[![](https://data.jsdelivr.com/v1/package/npm/jquery-html5storage/badge)](https://www.jsdelivr.com/package/npm/jquery-html5storage)

# html5Storage
A light jQuery Plugin to use Local Storage or Session Storage (Cookies for backward compatibility.)


npm: https://www.npmjs.com/package/jquery-html5storage


### Benchmark
https://github.com/FBlade/html5Storage/issues/1

## Usage

### Create or update Key-Value pair:

Local Storage

    $.localStorage.setItem('key_name', 'Key Value');

Session Storage

    $.sessionStorage.setItem('key_name', 'Key Value');

### Get value by key:

Local Storage

    $.localStorage.getItem('key_name');

Session Storage

    $.sessionStorage.getItem('key_name');

### Remove Key-Value pair:

Local Storage

    $.localStorage.removeItem('key_name');

Session Storage

    $.sessionStorage.removeItem('key_name');

### Remove all Key-Value pairs:

Local Storage

    $.localStorage.clear();

Session Storage

    $.sessionStorage.clear();


# Configuration

### Local Storage

    $.localStorage.settings = {
        cookiePrefix : 'html5fallback:localStorage:', // Prefix for the Local Storage substitution cookies
        cookieOptions : {
            path : '/', // Path for the cookie
            domain : document.domain, // Domain for the cookie
            expires: 365 // Days left for cookie expiring
        }
    };


### Session Storage

    $.sessionStorage.settings = {
        cookiePrefix : 'html5fallback:sessionStorage:', / Prefix for the Session Storage substitution cookies
        cookieOptions : {
            path : '/', // Path for the cookie
            domain : document.domain, // Domain for the cookie
            expires: undefined // Days left for cookie expiring (by default expires with the session)
        }
    };

---
_Source: https://npm.io/package/jquery-html5storage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
