Closed jfuehner closed 4 years ago
The script is only re-requested if your headers require it to be, same as any HTTP resource. If you're testing this with DevTools open, make sure you don't have caching disabled otherwise any usage of a resource will trigger a re-fetch.
Closing this out since it's likely working-as-designed (caching fixes it, use caching).
Curious if there is a more appropriate way to use the worker-plugin inside a loop? What I'm seeing is on every iteration the browser reloads the
./worker.js
file on eachnew Worker
...Say I have something like inside a loop...
Having the browser continuously request the same
./worker.js
file seems inappropriate. Ideally I would request the script once and be able to simply create new/multiple workers with the same script. I'm sure I am doing something wrong...