The SourceMap
HTTP response header links generated code to a source map, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger.
Header type | Response header |
---|---|
Forbidden header name | no |
Syntax
SourceMap: <url> X-SourceMap: <url> (deprecated)
Directives
<url>
- A relative (to the request URL) or absolute URL pointing to a source map file.
Examples
SourceMap: /path/to/file.js.map
Specifications
Specification | Title |
---|---|
Draft document | Source Map Revision 3 Proposal |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
SourceMap | Chrome
Full support
Yes
| Edge
Full support
≤79
| Firefox
Full support
55
| IE ? | Opera
Full support
Yes
| Safari
Full support
Yes
| WebView Android
Full support
Yes
| Chrome Android
Full support
Yes
| Firefox Android
Full support
55
| Opera Android
Full support
Yes
| Safari iOS
Full support
Yes
| Samsung Internet Android
Full support
Yes
|
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Non-standard. Expect poor cross-browser support.
- Non-standard. Expect poor cross-browser support.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.