How do I gzip my web files

前端 未结 9 1496
抹茶落季
抹茶落季 2021-02-03 11:45

As prescribed by Yahoo!, gzip\'ng files would make your websites load faster. The problem? I don\'t know how :p

相关标签:
9条回答
  • 2021-02-03 12:13

    If you are running Java Tomcat then you set a few properties on your Connector ( in conf/server.xml ).

    Specifically you set:

    1. compressableMimeType ( what types to compress )
    2. compression ( off | on | )
    3. noCompressionUserAgents ( if you don't want certain agents to receive gzip, list them here )

    Here's the tomcat documentation which discusses this: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

    0 讨论(0)
  • 2021-02-03 12:14

    http://developer.yahoo.com/performance/rules.html#gzip

    This is the reference if any asks me about my reference loading gzipped files

    0 讨论(0)
  • 2021-02-03 12:15

    http://www.webcodingtech.com/php/gzip-compression.php

    Or if you have Apache, try http://www.askapache.com/htaccess/apache-speed-compression.html

    Some hosting services have an option in the control panel. It's not always possible, though, so if you're having difficulty, post back with more details about your platform.

    0 讨论(0)
  • 2021-02-03 12:16

    If you are using Lighttpd, there is mod_compress.

    0 讨论(0)
  • 2021-02-03 12:16

    Gzip compresses your webpages and cascade style sheets before sending them over to the client browser other example this link

    0 讨论(0)
  • 2021-02-03 12:18

    Gzip compresses your webpages and cascade style sheets before sending them over to the client browser.

    This drastically reduces transfer time since the files are much smaller.

    There are different methods of setting up gzip compression depending on whether or not you've got an IIS or Apache server

    Example: this link.

    0 讨论(0)
提交回复
热议问题