Set the Page Optimization
Last Updated:2020-09-17
This interface is used to enable or disable page optimization. Page optimization refers to removing redundant content (such as annotations and repeated white spaces) on HTML pages.
Method | Path | Description |
---|---|---|
PUT | /v2/domain/{domain}/config?fileTrim | Enable or disable page optimization |
domain: CDN accelerated domain name.
Request body
Parameter | Optional | Type | Description |
---|---|---|---|
fileTrim | Required | bool | true means enabling page optimization, and false means disabling it. |
Response code (Http Status Code)
HTTP Status Code | Description |
---|---|
200 | Success |
400 | Update failures, parameter errors, etc. |
Request example
PUT /v2/domain/myself.baidu.com/config?fileTrim HTTP/1.1
Host: cdn.baidubce.com
Content-Length: 17
Content-Type: application/json
{
"fileTrim":true
}
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
{
"status":"RUNNING"
}