Server

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Server 标头描述了处理请求的源服务器(即生成响应的服务器)所使用的软件。

警告: 避免使用过于详细的 Server 值,因为它们可能会透露信息,使攻击者(更容易)利用已知的安全漏洞。

标头类型 响应标头
禁止修改的标头

语法

http
Server: <product>

指令

<product>

处理请求的软件或产品名称。通常格式类似于 User-Agent

包含多少细节是一个需要平衡的问题;暴露操作系统版本可能是个坏主意,正如前面关于过于详细的值的警告所提到的。不过,暴露的 Apache 版本可以帮助浏览器解决版本中的一个错误,即结合使用 Content-EncodingRange

示例

http
Server: Apache/2.4.1 (Unix)

规范

Specification
HTTP Semantics
# field.server

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Server

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

参见