• As far as I know, nginx do not require to have specific locations to server gzipped files. When a client request a URI, if gzip is on, nginx just check the presence of Accept-Encoding and compress it before serving it if the mime type is compressible. That the reason of using Vary "Accept-Encoding" in the response. The response may vary depending of which encoding the client accept.
    Unless I missed something, I think you can remove all locations with the _gzip suffix.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Benjamin Danon

    (@bndn)

    So yes, I missed rewrite rules that use gzip locations but don’t you think that the gzip_static nginx module should do the same thing faster?

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello,

    You also missed that compressing each time is slower than taking pre-compressed content from the cache.
    Also, regarding the other question, W3TC does not use the gzip_static nginx module to serve pre-compressed gzipped files because this module is not built by default and we can get even better behavior without it.

    Thread Starter Benjamin Danon

    (@bndn)

    Thank you for your response. Yes, I was aware of the benefit of using pre-compressed files. I didn’t found any information about this choice. I think it’s good to have the explanation in this forum.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove gzip specific locations in nginx config’ is closed to new replies.