Nginx+php+minify compresses your css, js detailed explanation

Minify is used for server-side combined minification of JavaScript and CSS. 1. First download Minify from Google code http://code.google.com/p/minify/wiki/UserGuide 2. Upload to the root directory of the website, of course, you can also specify the location, but it should be noted that Minify needs to be modified. 3. Modify Nginx configuration, please refer to my previous article: Minify rewrite configuration on Nginx P.S. The purpose of adding redirection is to merge the compressed js and css code path without carrying it? 4. Modify the Minify configuration file [php] view plain copy <?php / ** * Configuration for default Minify application * @package Minify */ } Then you can access it like this: [html] view plain copy http://www.abc.com /min/f=/style/global.css [html] view plain copy http://www.abc.com /min/f=/style/global.css,/style/index.css,/css /abc.css adding-top:1px; padding-right:1px; padding-bottom:1px; padding-left:1px; size:9px; display:inline-block; width:16px; height:16px; text-indent:-2000px”>view plain copy http://www.abc.com /min/f=/style/global.css,/style/index.css,/css /abc.css

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索