SourceMap
SourceMap
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
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
SourceMap |
Yes
Yes
|
≤79
≤79
|
55
27
|
? |
Yes
Yes
|
Yes
Yes
|
Yes
Yes
|
Yes
Yes
|
55
27
|
Yes
Yes
|
Yes
Yes
|
Yes
Yes
|
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/SourceMap