views:

28

answers:

1

I've noticed that most browsers (Chrome in particular) seem to cache web worker scripts even after you force the page to reload (SHIFT+F5, etc). The only reliable way I've found to force the cache to update is to type the worker script's path into the address bar and force reload it separately.

Obviously this is a royal pain when trying to develop, well, anything. Does anyone know of a reliable way to either stop the browser from caching worker scripts OR force it to reload them in a simple manner?

A: 

Have you tried using the Cache-Control: no-cache HTTP header to avoid having the worker script cached at all? You can generally get the caching behavior that you want by setting the appropriate HTTP headers.

Brian Campbell