SourceMap

The HTTP SourceMap response header includes a URL to a source map file, allowing the browser to reconstruct the source code for debugging purposes.

Usage

The HTTP SourceMap response header is sent by the server so that a client can download the original source code required to render the page. This facilitates debugging and troubleshooting problems with displaying page content.

The only directive is a URL, either absolute or relative, that points to the source map file.

Example

Response

SourceMap: /documents/src/show.js.map

Takeaway

The HTTP SourceMap request header is used to make the source code accessible to the browser so that it can present it for troubleshooting and debugging purposes.

See also

Last updated: June 2, 2022