服务器可以检查浏览器是否支持压缩

时间:2017-05-05 11:50:14

标签: php browser compression

我的php服务器是否可以检查客户端浏览器是否支持gzip或deflate压缩?如果是这样的话怎么办?

1 个答案:

答案 0 :(得分:-2)

  # compress text, html, javascript, css, xml:
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript

 #
<files *.html>
SetOutputFilter DEFLATE
</files>