提升性能: content 阶段的 caoncat 模块
- 功能: 当页面需要访问多个小文件时,把它们内容合并到一次http 响应中返回,提升性能;
- 模块:
ngx_http_concat_module
, 模块开发者Tengine(https://github.com/alibaba/nginx-http-concat): --add-module=../nginx-http-concat/
- 使用: 在 URI 后加上??,后通过多个
,
都会分隔文件。
- 如果还有参数,则在最后通过? 添加参数: https://g.alicdn.com/??kissy/k/6.2.4/seed-min.js,kg/global-util/1.0.7/index-min.js,tb/tracker/4.3.5/index.js,kg/tb-nav/2.5.3/index-min.js,secdev/sufei_data/3.3.5/index.js
concat 模块的指令
-
concat
:
- syntax: concat on| off;
- default: concat off;
- context: http, server, location
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)