I ran into a dilemma lately as I was exploring the various plugins for gulp. One of them was gulp-gzip
and till then, I have never thought about compressing my files. I got gulp-gzip
to work correctly and spit out gzipped versions of my HTML, CSS and JS files but then, what next?
I googled around and found that most articles talk about configuring the server to send gzipped versions of the content automatically to the client upon request. But then, I kind of don't seem to understand the purpose of gzipping locally.
So, my questions are:
- Can I serve gzipped content I get from
gulp-gzip
without configuring my server? - If yes, how should I proceed -- what should I name my gzipped files as? Should I keep the
.gz
extension and link to my CSS and JS files using the same? - If yes, can I test it locally by linking to the same
.gz
files? - If no, what is the purpose of
gulp-gzip
in a development environment if the server can be configured to do it automatically?