# SVG node - store the current state

**URL:** <https://discourse.nodered.org/t/svg-node-store-the-current-state/24671>\
**Category:** Developing Nodes\
**Created:** [11 April 2020 22:00 UTC](https://discourse.nodered.org/t/svg-node-store-the-current-state/24671 "2020-04-11T22:00:23Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [12 April 2020 06:44 UTC](https://discourse.nodered.org/t/svg-node-store-the-current-state/24671/5 "2020-04-12T06:44:53Z")

</div>

@bakman2, @Askjerry,  
Thanks, indeed _ **local storage in the client would be a third option** _. But like @dceejay says then perhaps I remember too much on the client side. E.g. when something changes in my SVG node, I need to know that on the client side to refresh the local storage there.

And we had a couple of other feature requests to be able to get the current status of a specified SVG shape, e.g. from @d0d04m3. To solve that, the only [solution](https://discourse.nodered.org/t/ui-svg-attributevalue-of-an-attributename/24445/11) would be server side DOM tree. So therefore _ **I would prefer to keep the cache on the server** _, otherwise I need to implement both (client and server) cache.

So I "_assume_" @Steve-Mcl and myself should do something similar like @hotNipi has already done, by adding a [data-storage](https://github.com/hotNipi/node-red-contrib-ui-state-trail#data-storage) option. Although I assume that even goes a step further by storing the data in the contextstore, so then I assume we should store the server-side DOM tree also (to be able to restore it after a restart)?

Please let the ideas coming!! Because I would like to implement this in the _ **2.0.0** _ release of the SVG node, and some folks are already waiting a long time for other stuff that I added into that release branch...

---

_[View the full topic](https://discourse.nodered.org/t/svg-node-store-the-current-state/24671)._
