jstuckey / gulp-gzip

Gzip plugin for gulp.
MIT License
175 stars 17 forks source link

Add deleteMode option. #20

Closed kimjuan closed 8 years ago

kimjuan commented 8 years ago

Some webserver modules such as nginx gzip_static looks for example.html.gz, serve it if it exists, else the original example.html will be served.

For instance, if example.html was 2kb, it would be gzipped and example.html.gz was created.

However, if later example.html is modified to content less than the threshold, gulp-gzip will only bypass it. Hence, you will end up with a new example.html yet old example.html.gz. Your webserver will continue to serve old content (example.html.gz).

jstuckey commented 8 years ago

@kimjuan, this looks good! I'll merge and deploy when I get home later.