Gordon Cumming
asked on
How do I apply gzip to http-server - http-server gzip
Hi i just purchased Winzip 22 yesterday
I'm trying to run a gzip application from the command line via http-server
eg. http-server gzip
to gzip the Angular bundles down to a much smaller size
Any ideas how I can do this?
Gordon Cumming
I'm trying to run a gzip application from the command line via http-server
eg. http-server gzip
to gzip the Angular bundles down to a much smaller size
Any ideas how I can do this?
Gordon Cumming
ASKER
Sorry It tells me that gzip is not an internal or external command
How do I get gzip to be recognized from the command prompt
Gordon Cumming
How do I get gzip to be recognized from the command prompt
Gordon Cumming
Then you need to download the gzip software and install it on your system.
Under a Debian-based system (including Ubuntu): apt-get install gzip
Under a Debian-based system (including Ubuntu): apt-get install gzip
to gzip the Angular bundles down to a much smaller sizeIf you are thinking that this will make downloading the Angular files to the browser happen quicker, that isn't how it works. 'gzip' compression is negotiated and coordinated between the server and the browser. If you gzip the files separately then they will arrive at the browser still gzipped and they will not be understood or readable by the browser.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
First tar the target files. This is required because gzip will only work on one file at a time.
e.g. tar -cvf my-archive.tar /this/folder/*
Then gzip the tar file:
e.g. gzip -9v my-archive.tar