How do I enable mod_deflate for PHP files?

后端 未结 6 1868
鱼传尺愫
鱼传尺愫 2021-01-21 17:17

I have a Liquid Web VPS account, I\'ve made sure that mod_deflate is installed and running/active.

I used to gzip my css and js files via PHP, as well as my PHP files th

6条回答
  •  遇见更好的自我
    2021-01-21 17:44

    That whole config is way obsolete. It can and should be deleted now: Netscape 4 hasn't been around for a long time, and setting Vary: User-Agent unnecessarily hinders caching.

    The only mod_deflate config you need is one line to turn deflate on for compressible media types, either using AddOutputFilter to choose compressible files by extension, or AddOutputFilterByType to choose them by returned Content-Type.

提交回复
热议问题