> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# lynx: unsubscribeSessionStorage() static method

APISummary
The `lynx.unsubscribeSessionStorage` method cancels a data change listener registered with [lynx.subscribeSessionStorage](/next/api/lynx-api/main-thread/lynx-subscribe-session-storage.md) in the current WhiteBoard. Canceling the listener does not remove the cached data.

See [Share Data Across LynxViews](/next/guide/share-data-across-lynxviews.md) for sharing scope, native configuration, and lifecycle management.

## Syntax

```ts
lynx.unsubscribeSessionStorage(key, id);
```

### Parameters

#### key

The key for the cached data, used to retrieve data and listen for changes.

#### id

The ID for the data change listener. Use the ID returned by [lynx.subscribeSessionStorage](/next/api/lynx-api/main-thread/lynx-subscribe-session-storage.md) to cancel the listener.

### Return Value

None (`undefined`).

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.lynx.unsubscribeSessionStorage`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/lynx/unsubscribeSessionStorage.json) · [API Reference](/next/api/lynx-api/lynx/lynx-unsubscribe-session-storage)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| unsubscribeSessionStorage | Yes (2.9) | Yes (3.8) | Yes (2.9) | Yes (3.5) | Yes (3.5) | No |

**`unsubscribeSessionStorage`**

The `lynx.unsubscribeSessionStorage` method is used to cancel the listener for changes in data shared across multiple LynxViews. This enables data sharing between multiple pages via `SessionStorage`. You can call [lynx.setSessionStorageItem](./lynx-set-session-storage.mdx) to set the cached data. After cancellation, the cached data corresponding to this key will no longer be listened to.

- **Web — Not supported:** The Web runtime does not implement the native session-storage bridge.

