You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse Dashboard can cache its resources such as bundles in the browser, so that opening the dashboard in another tab does not reload the dashboard resources from the server but from the local browser cache. Caching only starts after login in the dashboard.
517
517
518
-
| Parameter | Type | Optional | Default | Example | Description |
|`enableBrowserServiceWorker`| Boolean | yes |`false`|`true`| Enables the browser service worker to cache dashboard resources in the browser for faster dashboard loading in additional browser tabs. |
518
+
| Parameter | Type | Optional | Default | Example | Description |
|`enableResourceCache`| Boolean | yes |`false`|`true`| Enables caching of dashboard resources in the browser for faster dashboard loading in additional browser tabs. |
521
521
522
522
523
523
Example configuration:
524
524
525
525
```javascript
526
526
constdashboard=newParseDashboard({
527
-
enableBrowserServiceWorker:true,
527
+
enableResourceCache:true,
528
528
apps: [
529
529
{
530
530
serverURL:'http://localhost:1337/parse',
@@ -537,7 +537,10 @@ const dashboard = new ParseDashboard({
537
537
```
538
538
539
539
> [!Warning]
540
-
> Enabling this feature will start a browser service worker that caches dashboard resources locally only once. As long as the service worker is running, it will prevent loading any dashboard updates from the server, even if the user reloads the browser tab. The service worker is automatically stopped, once the last dashboard browser tab is closed. On the opening of the first dashboard browser tab, the dashboard resources are again loaded from the server and a new service worker is started.
540
+
> This feature can make it more difficult to push dashboard updates to users. Enabling the resource cache will start a browser service worker that caches dashboard resources locally only once. As long as the service worker is running, it will prevent loading any dashboard updates from the server, even if the user reloads the browser tab. The service worker is automatically stopped, once the last dashboard browser tab is closed. On the opening of the first dashboard browser tab, a new service worker is started and the dashboard resources are loaded from the server.
541
+
542
+
> [!Note]
543
+
> For developers: during dashboard development, the resource cache should be disabled to ensure reloading the dashboard tab in the browser loads the new dashboard bundle with any changes you made in the source code. You can inspect the service worker in the developer tools of most browsers. For example in Google Chrome, go to *Developer Tools > Application tab > Service workers* to see whether the dashboard service worker is currently running and to debug it. Updates to the service worker source code in `src/registerServiceWorker.js` requires to restart `npm run dev` as it is not part of the dashboard bundle but the environment in which the bundle is mounted.
0 commit comments