Support » Plugin: W3 Total Cache » Remove gzip specific locations in nginx config

  • Resolved bndn


    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)
  • 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 Support Marko Vasiljevic



    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.

    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.