Name

XMLHttpRequest.getResponseHeader( ): get the value of a named HTTP response header

Synopsis

String getResponseHeader(Stringheader)

Arguments

header

The name of the HTTP response header whose value is to be returned. You may specify this header name using any case: the comparison to response headers is case-insensitive.

Returns

The value of the named HTTP response header, or the empty string if no such header was received or if readyState is less than 3. If more than one header with the specified name is received, the values of those headers are concatenated and returned, using a comma and space as the delimiter.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.