# A guide to understanding 'Persistent Context'

**URL:** <https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115>\
**Category:** General\
**Created:** [19 October 2018 10:13 UTC](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115 "2018-10-19T10:13:24Z")\
**Posts on this page:** 1\
**Showing post:** 75

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 December 2020 10:05 UTC](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115/75 "2020-12-12T10:05:41Z")

</div>

Here is the breakdown on how the persistant context is stored,

- **Global** : all global context is stored in a single JSON file, so if you have 4 tabs in your flow each creating a global item, they will all be stored in the 'global' folder in a single file called 'global.json'  

- **Flow** : all flow content on a `tab` is stored in in a single JSON file.The file's name is 'flow.json' and it is stored in a folder that has the ID of the flow  

- **Context** : all context content for a single `node` is stored in in a single JSON file.  

Here is what the `flow.json` contains in these examples:  
 ![Screen Shot 2020-12-12 at 4.55.53 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/9301b632ac12ba7da7aecc7bb9971c835487c00c.png)

Bottom line - you would need to save each context item as an object that contained a value AND a timestamp. Then in a flow in your project, you would need to parse thru each of the context items to check it's timestamp and then delete that context item.

While you could edit the file itself and remove the items, you would have to stop Node-RED, edit the file and then start Node-RED again.

---

_[View the full topic](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115)._
