gzip
gzip copied to clipboard
Add support for serving precompressed static files from ServeFile
Thanks for providing this useful middleware first of all. I'm wondering if the Static files from http.ServeFile
method is also supported. Especially,
It would also be 'nice to have' if the http.ServeFile method would check for the presence of xxx.gz and serve it if present and the accept header includes gzip. This is a trick that nginx does and it greatly accelerates the serving of static css, js etc files because they can be compressed just once during the build process. There's the added benefit too that they are smaller files to read, as well as needing fewer bytes on the wire
thanks
Yes, I had this thought, that would be neat.
Need to figure out how to implement this.
Thanks for your advice.
Any update on this?