example: cache-control header effect on ControlJS pre-fetching

load again

This page tests whether ControlJS downloads a script twice if the script is not cacheable. The danger is that ControlJS loads a script first as an image or object, then again as a script. If the script isn't cacheable, it might get downloaded twice in which case performance would be worse.

This page contains 10 text/cjs scripts each with a 2 second delay.
The following table shows the caching headers returned by each of the scripts and the load time for each If the load/exec time is ~2s, the script was loaded twice, once during ControlJS' pre-fetch stage and again during execution.

# expires (date) cache-control age last-modified load/exec time * (ms)
* Load / exec time measures the time it takes to load the script after the previous script has finished. It should be small (<500) since the script should have been cached during pre-fetch

This image will delay the window.onload event by two seconds. This will prevent ControlJS from starting earlier on Internet Explorer than it does on other browsers