<p>I have a JavaScript resource that has the possibility of being edited at any time. Once it is edited I would want it to be propagated to the user's browser relatively quickly (like maybe 15 minutes or so), however, the frequency of this resource being editing is few and far between (maybe 2 a month).</p>

<p>I'd rather the resource to be cached in the browser, since it will be retrieved frequently, but I'd also like the cache to get reset on the browser at a semi-regular interval.</p>

<p>I know I can pass a no-cache header when I request for the resource, but I was wondering when the cache would automatically reset itself on the browser if I did not pass no-cache.</p>

<p>I imagine this would be independent for each browser, but I'm not sure.</p>

<p>I tried to Google this, but most of the hits I found were about clearing the browser's cache... which isn't what I'm looking for.</p>

Put a version on your javascript code like this that is updated when you make a change
```
```
<script src="/code.js?ver=123" type="text/javascript"></script>
```
```
They will then always get new version.