My attempt to have Chrome cache my JavaScript by including a version number in the HTML code as a cache buster seems to not be working. Despite setting up the correct server headers, Chrome continues to reload the 1MiB of Javascript each time. The HTML code looks like this:
<script type="application/javascript" async src="/index.js?version=123"></script>
The Response Headers are as follows:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: public
Content-Encoding: gzip
Content-Language: en-US
Content-Type: application/javascript
Last-Modified: Wed, 23 Jan 2019 15:09:36 GMT
Vary: Origin
Vary: Accept-Encoding
Date: Thu, 24 Jan 2019 00:52:23 GMT
Transfer-Encoding: chunked
Despite ensuring that "disable Cache" is un-selected in the Network tab and turning off "Disable cache (when devTools is running)" in the devTools settings, only my fonts seem to be cached while the index.js file still loads entirely each time.