# Avoiding stale config

Some servers aggressively cache `config.json`. To force a fresh fetch, add this
`<script>` to the `<head>` of JBrowse's index.html:

```html
<script>
  window.__jbrowseCacheBuster = true
</script>
```

This appends a random query string to the config.json request, bypassing the
browser cache. It is a single line, so a build script can inject it.

## Loading config.json from another path

The same `<head>` script can also move the config JBrowse loads by default, for
a deployment whose config does not sit next to index.html:

```html
<script>
  window.__jbrowseConfigPath = '/configs/production.json'
</script>
```

This changes the default only; a [`?config=`](https://jbrowse.org/jb2-staging/docs/urlparams#config) in the URL
still takes precedence.

## See also

- [](https://jbrowse.org/jb2-staging/docs/config_guides/deploying)
- [](https://jbrowse.org/jb2-staging/docs/config_guides/intro)

