Node Red UI template how to clear cache

Hi i have a UI template node like this

[{"id":"a5c1aeec.acf41","type":"ui_template","z":"317f5671.321bea","group":"7390bf6e.e7d18","name":"alert","order":0,"width":"","height":"","format":"<meta http-equiv=\"cache-control\" content=\"no-cache\" />\n<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n<meta http-equiv=\"Expires\" content=\"-1\" />\n\n<div></div>\n<script>\n\n(function(scope) {\n    scope.$watch('msg', function(msg) {\n                alert(msg.payload);\n                 return msg;\n    });\n  \n})(scope);\n  \n</script>\n\n","storeOutMessages":false,"fwdInMessages":false,"templateScope":"local","x":930,"y":540,"wires":[[]]},{"id":"ea160087.f05fd","type":"inject","z":"317f5671.321bea","name":"","topic":"","payload":"hello","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":704,"y":539,"wires":[["a5c1aeec.acf41"]]},{"id":"7390bf6e.e7d18","type":"ui_group","z":"","name":"info","tab":"3b15c8d0.06c048","order":5,"disp":false,"width":"9","collapse":false},{"id":"3b15c8d0.06c048","type":"ui_tab","z":"","name":"config","icon":"settings","order":4}]

When i do page reload this is executing with previous value though no "msg.payload" passed to it.
can anyone help me how to clear the cache or on reload this should not show any alert.

Did you try unticking the store to saved state option ?

ya i have tried but no luck

Can anyone enlighten me what this "store to saved state option" is?

Kind regards,
Marcel

It means that anything sent from the the!plate is saved in the server, and if the page is refreshed it is resent to the dashboard, which not what this user wanted.

1 Like