How does autorefresh work in gb.loadFeatures({ aut...
# announcements
s
How does autorefresh work in gb.loadFeatures({ autoRefresh: true })? How does it know when to refresh features? Is it polling every few mins or server sent events or something else?
f
Hi Arpan. We use Server-Sent Events, but only if you're connecting through a GrowthBook Proxy server (https://docs.growthbook.io/self-host/proxy). Otherwise, that setting has no effect. If you're using GrowthBook Cloud, we're planning to roll out SSE support soon, so that you can get the autoRefresh behavior without having to run your own Proxy server. Alternatively, you can manually update at any time by calling
gb.refreshFeatures()
. So you can implement your own polling behavior if you want or hook into user actions like navigation or button clicks.
s
thanks for the detailed info.