JS file caching is different when included via script tag vs GET

I got it working but not completely as I had expected it to. Here's what I ended up doing.

In the directory where I wanted to serve my js file from I added an .htaccess file

<FilesMatch "\.(js|css)$">
    Header set Cache-Control "no-cache, must-revalidate"
</FilesMatch>

I realized that if I was locally adding my js files to cache it would always pull from the local cache and never even make the request to the server. So, even if the Etag had been changed my client would never know because the file was already locally cached.

So, I decided to not cache the file at all and revalidate. So, while I do have a slight overhead of the http headers, I will always get the latest file without needing to fetch the whole file every single time.