# Custom ui node: how to get synchronisation between sessions and after page refresh

**URL:** <https://discourse.nodered.org/t/custom-ui-node-how-to-get-synchronisation-between-sessions-and-after-page-refresh/45065>\
**Category:** Dashboard\
**Created:** [2 May 2021 15:57 UTC](https://discourse.nodered.org/t/custom-ui-node-how-to-get-synchronisation-between-sessions-and-after-page-refresh/45065 "2021-05-02T15:57:50Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)\
**Post date:** [10 May 2021 20:54 UTC](https://discourse.nodered.org/t/custom-ui-node-how-to-get-synchronisation-between-sessions-and-after-page-refresh/45065/3 "2021-05-10T20:54:25Z")

</div>

Finally I found out how to do this with custom ui nodes. If you set the `storeFrontEndInputAsState` to `true`the dashboard does the work for you. It will pass the last state and every new state to all connected clients as normal messages. A little bit tricky (at lest for me) is how to determine if the origin of a message is actual the own message sent by the client to avoid undesired loops. But in the end I found a solution (I think)

> [@\[ANNOUNCE\] colour picker widget based on iro.js](https://discourse.nodered.org/t/announce-colour-picker-widget-based-on-iro-js/45393):
>
> node-red-contrib-ui-iro-color-picker Alternative color picker node utilizing the [iro.js](https://iro.js.org) widget. The main credit goes to [James](https://jamesdaniel.dev/) for the iro.js widget. I was searching for a colour picker which is usable in different ways and on mobile devices for a long time. iro.js popped up in the forum from time to time and to be honest I hoped that someone else (with more experience) could do the job. In the end I was procrastinating other jobs and thought it would be a nice small project to learn how to i…

---

_[View the full topic](https://discourse.nodered.org/t/custom-ui-node-how-to-get-synchronisation-between-sessions-and-after-page-refresh/45065)._
