Fortinet black logo

CLI Reference

server-policy acceleration

server-policy acceleration

Acceleration provides a technology solution to speed up web application response and optimize web pages and resources in real time.

An Acceleration policy specifies the option(s) for optimizing the delivery of web applications. To take full advantage of the benefits that Acceleration offers, you must first create your own Acceleration policy, and then select the policy in Policy > Server Policy.

You can also specify certain URLs to be skipped for web application delivery optimization, and add the exception items to the acceleration policy.

FortiWeb offers options for optimizing the delivery of the following web content:

  • HTML
  • JavaScript
  • CSS
tooltip icon

If Acceleration is not enabled, go to system feature-visibility to enable it first.

Syntax

config server-policy acceleration exception

edit "<exception_name>"

config list

edit "<exception-item_id>"

set host-status {enable | disable}

set host <host_int>

set url-type {plain | regular}

set url-pattern <url-pattern_str>

next

end

next

end

config server-policy acceleration policy

edit "<policy_name>"

set exception <exception_str>

set html-minify {enable | disable}

set html-combine-heads {enable | disable}

set html-css2head {enable | disable}

set js-minify {enable | disable}

set css-minify {enable | disable}

next

end



Variable Description Default
"<exception_name>" Enter a name for the exception rule. No default.
"<exception-item_id>" Enter an ID for the acceleration exception item.

No default

host-status {enable | disable} Enable to require that the Host: field of the HTTP request match a protected host names entry in order to match the Acceleration exceptions rule. Also configure host <host_int>. disable
host <host_int>

Select which protected host names entry (either a web host name or IP address) that the Host: field of the HTTP request must be in to match the Acceleration exceptions rule.

No default.
url-type {plain | regular} Select whether url-pattern <url-pattern_str> will contain a literal URL (plain), or a regular expression designed to match multiple URLs (regular).
plain

url-pattern <url-pattern_str>

Depending on your selection in url-type {plain | regular}, enter either:

  • The literal URL, such as /index.php, that the HTTP request must contain in order to match the acceleration rule. The URL must begin with a slash ( / ).
  • A regular expression, such as ^/*.php, matching all and only the URLs to which the acceleration rule should apply. The pattern is not required to begin with a slash ( / ). However, it must at least match URLs that begin with a slash, such as /index.cfm.

Note: Regular expressions beginning with an exclamation point ( ! ) are not supported. For information on language and regular expression matching, see the FortiWeb Administration Guide:

HTTPs://docs.fortinet.com/fortiweb/admin-guides

No default.

"<policy_name>"

Enter a name for the acceleration policy.

No default.

exception <exception_str>

Select the acceleration exception rule created.

No default.

html-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

html-combine-heads {enable | disable}

Enable to combine multiple heads in HTML page to one.

disable

html-css2head {enable | disable}

Enable to move CSS elements above script tags.

Note: This ensures that the CSS styes are parsed in the head of the HTML page before any body elements are introduced. In so doing, it can effectively reduce the number of times web browsers have to re-flow HTML documents.

disable

js-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

css-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

Related topics

server-policy acceleration

Acceleration provides a technology solution to speed up web application response and optimize web pages and resources in real time.

An Acceleration policy specifies the option(s) for optimizing the delivery of web applications. To take full advantage of the benefits that Acceleration offers, you must first create your own Acceleration policy, and then select the policy in Policy > Server Policy.

You can also specify certain URLs to be skipped for web application delivery optimization, and add the exception items to the acceleration policy.

FortiWeb offers options for optimizing the delivery of the following web content:

  • HTML
  • JavaScript
  • CSS
tooltip icon

If Acceleration is not enabled, go to system feature-visibility to enable it first.

Syntax

config server-policy acceleration exception

edit "<exception_name>"

config list

edit "<exception-item_id>"

set host-status {enable | disable}

set host <host_int>

set url-type {plain | regular}

set url-pattern <url-pattern_str>

next

end

next

end

config server-policy acceleration policy

edit "<policy_name>"

set exception <exception_str>

set html-minify {enable | disable}

set html-combine-heads {enable | disable}

set html-css2head {enable | disable}

set js-minify {enable | disable}

set css-minify {enable | disable}

next

end



Variable Description Default
"<exception_name>" Enter a name for the exception rule. No default.
"<exception-item_id>" Enter an ID for the acceleration exception item.

No default

host-status {enable | disable} Enable to require that the Host: field of the HTTP request match a protected host names entry in order to match the Acceleration exceptions rule. Also configure host <host_int>. disable
host <host_int>

Select which protected host names entry (either a web host name or IP address) that the Host: field of the HTTP request must be in to match the Acceleration exceptions rule.

No default.
url-type {plain | regular} Select whether url-pattern <url-pattern_str> will contain a literal URL (plain), or a regular expression designed to match multiple URLs (regular).
plain

url-pattern <url-pattern_str>

Depending on your selection in url-type {plain | regular}, enter either:

  • The literal URL, such as /index.php, that the HTTP request must contain in order to match the acceleration rule. The URL must begin with a slash ( / ).
  • A regular expression, such as ^/*.php, matching all and only the URLs to which the acceleration rule should apply. The pattern is not required to begin with a slash ( / ). However, it must at least match URLs that begin with a slash, such as /index.cfm.

Note: Regular expressions beginning with an exclamation point ( ! ) are not supported. For information on language and regular expression matching, see the FortiWeb Administration Guide:

HTTPs://docs.fortinet.com/fortiweb/admin-guides

No default.

"<policy_name>"

Enter a name for the acceleration policy.

No default.

exception <exception_str>

Select the acceleration exception rule created.

No default.

html-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

html-combine-heads {enable | disable}

Enable to combine multiple heads in HTML page to one.

disable

html-css2head {enable | disable}

Enable to move CSS elements above script tags.

Note: This ensures that the CSS styes are parsed in the head of the HTML page before any body elements are introduced. In so doing, it can effectively reduce the number of times web browsers have to re-flow HTML documents.

disable

js-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

css-minify {enable | disable}

Enable to minify js in the script and delete the extra white space and comments to reduce bandwidth utilization.

disable

Related topics