I use zabbix 3.4.1 with nginx and gzip compression. jsLoader.php responses are compressed, but they cannot be cached by browser due to 2 cross-dependant reasons:
1) ETag header value is malformed in jsLoader.php, it should be quoted with double quotes, see https://tools.ietf.org/html/rfc7232#section-2.3 . Nginx removes such malformed ETag header during compression, see https://github.com/nginx/nginx/blob/3d42fcd6d004a6875d474becec5d6d91a16e4e07/src/http/ngx_http_core_module.c#L1855
2) jsLoader.php ETag verification doesn't support weak ETag value, which is used by nginx instead of ETag after gzip compression.
Please check attached patch, it works in my tests.