Content-Length

Content-Length

Content-Length实体报头指示该实体主体的大小,以字节为单位的十进制数,发送到接收方。

Header typeEntity header
Forbidden header nameyes

语法

Content-Length: <length>

指令

<length> 十进制数字的长度。

规范

SpecificationTitle
RFC 7230, section 3.3.2: Content-LengthHypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing

浏览器兼容性

FeatureChromeFirefoxEdgeInternet ExplorerOperaSafari
Basic Support(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)

FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)