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
+
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
+
522
+
523
+
Example configuration:
524
+
525
+
```javascript
526
+
constdashboard=newParseDashboard({
527
+
enableResourceCache:true,
528
+
apps: [
529
+
{
530
+
serverURL:'http://localhost:1337/parse',
531
+
appId:'myAppId',
532
+
masterKey:'myMasterKey',
533
+
appName:'MyApp'
534
+
}
535
+
]
536
+
});
537
+
```
538
+
539
+
> [!Warning]
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.
544
+
513
545
# Running as Express Middleware
514
546
515
547
Instead of starting Parse Dashboard with the CLI, you can also run it as an [express](https://github.com/expressjs/express) middleware.
0 commit comments