可选地提供静态压缩的CSS&JS
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了可选地提供静态压缩的CSS&JS相关的知识,希望对你有一定的参考价值。
Combine this with the my compression script and things load real fast. I think I pulled some of this code of a site on google... can't claim complete credit.
# no weird non-ASCII quotes! Arg! They wasted an hour of time! # info: http://www.bluehostforum.com/showthread.php?t=11402 Options +followsymlinks <FilesMatch ".js.gz$"> ForceType text/javascript Header set Content-Encoding: gzip </FilesMatch> <FilesMatch ".js$"> RewriteEngine On RewriteCond %{HTTP_USER_AGENT} !".*Safari.*" RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule (.*).js$ $1.js.gz [L] ForceType text/javascript </FilesMatch> <FilesMatch ".css.gz$"> ForceType text/css Header set Content-Encoding: gzip </FilesMatch> <FilesMatch ".css$"> RewriteEngine On RewriteCond %{HTTP_USER_AGENT} !".*Safari.*" RewriteCond %{HTTP:Accept-Encoding} gzip RewriteCond %{REQUEST_FILENAME}.gz -f RewriteRule (.*).css$ $1.css.gz [L] ForceType text/css </FilesMatch>
以上是关于可选地提供静态压缩的CSS&JS的主要内容,如果未能解决你的问题,请参考以下文章
[ jquery 效果 fadeToogle([speed,[easing],[fn]]) ] 此方法用于通过切换不透明度的变化来实现所有匹配元素的淡入效果,并在动画完成后可选地触发一个回调函数(代码