http-concat #
This is a module that is distributed with tengine which is a distribution of Nginx that is used by the e-commerce/auction site Taobao.com. This distribution contains some modules that are new on the Nginx scene. The ngx_http_concat module is one of them.
Source: upstream source
Directives
concat #
syntax: concat on | off (on/off flag); · context: http, server, location
This applies to any other type of files that you decide to concatenate by adding the respective MIME type via concat_types, <br/> <br/> concat\_max\_files numberp default: concat_max_files 10 context: http, server, location Defines the maximum number of files that can be concatenated in a given context.
concat_delimiter #
syntax: concat_delimiter 1 arg (string); · context: http, server, location
Set it to the value you need. <br/> <br/> concat_delimiter: string default: NONE context: http, server, locatione Defines the delimiter between two files.
concat_ignore_file_error #
syntax: concat_ignore_file_error on | off (on/off flag); · context: http, server, location
on | off
concat_max_files #
syntax: concat_max_files 1 arg (integer); · context: http, server, location
This applies to any other type of files that you decide to concatenate by adding the respective MIME type via concat_types, <br/> <br/> concat\_max\_files numberp default: concat_max_files 10 context: http, server, location Defines the maximum number of files that can be concatenated in a given context.
concat_types #
syntax: concat_types 1+ args; · context: http, server, location
This applies to any other type of files that you decide to concatenate by adding the respective MIME type via concat_types, <br/> <br/> concat\_max\_files numberp default: concat_max_files 10 context: http, server, location Defines the maximum number of files that can be concatenated in a given context.
concat_unique #
syntax: concat_unique on | off (on/off flag); · context: http, server, location
So if you have CSS and JS you cannot do something like this: http://example.com/static/??foo.css,bar/foobaz.js In order to do that you must set concat_unique off.
Example
location /static/ {
concat on;
concat_max_files 20;
concat_types text/css application/javascript;
concat_unique off;
}
# Then request: /static/??reset.css,layout.css,theme.css