Closed
Description
Hi there,
It seems that the browser-sync client javascript that is served to the browser has no caching headers in the HTTP response leading the browser to not cache it upon new requests to the file.
I'm wondering why because other files served through browser sync correctly have the caching headers (specially the Cache-Control
and Etag
ones). I am missing something obvious here?
Here the steps to replicate (I could create a small repo if you prefer):
$ mkdir /tmp/browser-sync-client && cd /tmp/browser-sync-client
$ echo "<html>Browser Sync Caching Test</html>" > index.html
$ browser-sync start --server &
$ # You can also check in browser developer tools
$ curl -v http://localhost:3000 2>&1 | grep "Cache\|ETag" # Correct, has caching headers
$ curl -v http://localhost:3000/browser-sync/browser-sync-client.2.7.6.js 2>&1 | grep "Cache-Control\|ETag" # Incorrect, no caching headers
I'm willing to tackle this issue if you aim me in the right direction.
Regards,
Matt