Could websocket support gzip compression?

WebSocket compression is enabled in some browsers by default (at the time of writing for example in Chrome, but not in Firefox). The client has to include the ‘Sec-WebSocket-Extensions: permessage-deflate’ header for this. If the server responds with the same extension, the WebSocket communication is compressed on a frame basis. As far as I know, … Read more

how to enable gzip compression in angular cli for production build

Angular-cli team has removed the support for generating compress files (.gz). Github discussion url. We can use a gulp task for it. Install following npm modules: $npm install –save-dev gulp $npm install –save-dev gulp-gzip Create gulpfile.js. The file name has to be gulpfile.js not any other names. var gulp = require(‘gulp’); var gzip = require(‘gulp-gzip’); … Read more

Disable gzip compression in chrome

Chrome doesn’t seem to expose this setting, but what you can do is the following: get the ModHeader plugin for Chrome: https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en (or any other that allows you to fiddle with your browser request headers) set a new custom header accept-encoding to either: an empty value or gzip;q=0,deflate;q=0 either should work

Is there a benefit to minifying JavaScript before gzipping it?

As for raw file size, here is a sample (jQuery 1.4.2): $ curl http://code.jquery.com/jquery-1.4.2.js | gzip > jquery.gz $ curl http://code.jquery.com/jquery-1.4.2.min.js | gzip > jquery-min.gz $ ls -la jquery* -rw-r–r– 1 me staff 24545 Apr 7 12:02 jquery-min.gz -rw-r–r– 1 me staff 45978 Apr 7 12:02 jquery.gz So the minified version is about half the … Read more

Get NGINX to serve .gz compressed asset files

1) ensure you have Nginx > 1.2.x (to proper headers modifications) and compile with –with-http_gzip_static_module option 2) Enable this option gzip on (to serve back-end response with gzip header) 3) Setup assets location with gzip_static on (to serve all.css.gz, all.js.gz files directly) 4) Prevent of etag generation and last-modify calculation for assets 5) Turn on … Read more

Random access to gzipped files?

Yes, you can access a gzip file randomly by reading the entire thing sequentially once and building an index. See examples/zran.c in the zlib distribution. If you are in control of creating the gzip file, then you can optimize the file for this purpose by building in random access entry points and construct the index … Read more

tech