reloadForStaleChunks()
Home > @gooddata/sdk-ui-pluggable-host > reloadForStaleChunks
reloadForStaleChunks() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Triggers a hard page reload once, guarded against loops by sessionStorage.
If the same COMMITHASH already triggered a reload within the last 30 seconds, the call is a no-op so the user is not stuck reloading a broken build.
Signature:
export declare function reloadForStaleChunks(reason: string): void;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
reason |
string |
Returns:
void
Remarks
Uses location.replace with a cache-busting query parameter rather than location.reload(). A soft reload honours the HTTP cache, which has bitten us when an intermediate chunk (max-age=30d) is still served from cache and keeps replaying a stale module graph after the deploy moved forward. Writing a unique URL forces the browser to treat it as a fresh navigation.