https://www.growthbook.io/ logo
#announcements
Title
# announcements
s

sticky-insurance-60813

03/27/2023, 7:48 PM
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

future-teacher-7046

03/27/2023, 8:17 PM
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

sticky-insurance-60813

03/27/2023, 9:16 PM
thanks for the detailed info.
16 Views