I set up a global variable with a number slider using the sticky function in scriptcontext module.
However, I found that the value of the variable doesn’t update immediately when I am changing the value of the number slider. I need to press F5 to refresh the value everytime.
Can this be solved?
Hmm this link seems to suggest your method should work, with a caveat about having multiple documents open at once and associated workaround.
It also suggests another method with (optionaly hidden) wires.
You will still need to expire any component that reads the sticky dict value (using wires or events). And as always, providing an example helps with troubleshooting/suggestions.