# Session variable

**URL:** <https://discourse.nodered.org/t/session-variable/23133>\
**Category:** General\
**Created:** [15 March 2020 12:10 UTC](https://discourse.nodered.org/t/session-variable/23133 "2020-03-15T12:10:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glauberjnb](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@glauberjnb](https://discourse.nodered.org/u/glauberjnb)\
**Post date:** [15 March 2020 12:10 UTC](https://discourse.nodered.org/t/session-variable/23133/1 "2020-03-15T12:10:35Z")

</div>

Hi,

How can we store session variables similar to PHP's $ \_SESSION for the HTTP Request component in NODE-RED? We have already managed to create and read the browser cookie, but we don't know how to create a variable that can be automatically destroyed when the session expires. We need to destroy the variable so as not to occupy server memory with closed sessions.

Tks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [14 May 2020 12:10 UTC](https://discourse.nodered.org/t/session-variable/23133/2 "2020-05-14T12:10:41Z")

</div>

Closed on 14 May 2020 12:10 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
