RefreshOnWindowFocus
By setting options.refreshOnWindowFocus, the request will be refreshed when the browser is refocus and revisible.
Code demonstration
API
Options
| Property | Description | Type | Default | 
|---|---|---|---|
| refreshOnWindowFocus | Whether to re-initiate the request when the screen refocus or revisible. | boolean|Ref<boolean> | false | 
| focusTimespan | Re-request interval, in milliseconds | number| Ref<number> | 5000 | 
Remark
options.refreshOnWindowFocussupport dynamic changes.options.focusTimespansupport dynamic changes.- Listen for browser events 
visibilitychangeandfocus.