2012-05-06 72 views
0

在文檔中說它可以壓縮pie.htc,但沒有關於如何去做的線索。現在我該如何gzip .htc文件並讓瀏覽器知道它是壓縮的?(我記得,對.js文件做同樣的事情。)壓縮css3-pie

回答

1

最快的方法是壓縮服務器必須輸出的所有內容。

阿帕奇:

<IfModule mod_gzip.c> 
# Enable the module 
mod_gzip_on yes 
# Allow GZIP compression for all requests 
mod_gzip_item_include mime .? 
</IfModule> 


# Method 2: Compress all content, manually excluding specified file types 
<IfModule mod_deflate.c> 
    # place filter 'DEFLATE' on all outgoing content 
    SetOutputFilter DEFLATE 
    # exclude uncompressible content via file type 
    SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png|rar|zip)$ no-gzip 
    <IfModule mod_headers.c> 
    # properly handle requests coming from behind proxies 
    Header append Vary User-Agent 
    </IfModule> 
</IfModule>