开发者

include external css.gz in drupal themes

im trying to include css.gz from external source, but still not works on all browsers

<link rel="stylesheet" type="text/css" media="all" h开发者_如何学Goref="http://www.website.com/style.css.gz" />

i dont know what is the problem

(my web server: nginx, and test server: apache)

thanks


If you have access to the .htaccess file you can use this script to gzip css only to browsers that support it:

# This uses mod_deflate, which is pretty standard on Apache 2.  Loading
# mod_deflate looks like this:
#
#   LoadModule deflate_module modules/mod_deflate.so
#
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \\bMSIE !no-gzip !gzip-only-text/html

See the original post: How can I make my .htaccess file allow Safari & other browsers to open GZIP?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜