我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
SourceMap
Non-standard
Chrome Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Edge ? Firefox Full support 55
Full support 55
Full support 27
Prefixed
Prefixed Implemented with the vendor prefix: X-
IE ? Opera Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Safari Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
WebView Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Chrome Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Edge Mobile ? Firefox Android Full support 55
Full support 55
Full support 27
Prefixed
Prefixed Implemented with the vendor prefix: X-
Opera Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Safari iOS Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-
Samsung Internet Android Full support Yes
Full support Yes
Full support Yes
Prefixed
Prefixed Implemented with the vendor prefix: X-

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.

See also

文件標籤與貢獻者

此頁面的貢獻者: mdnwebdocs-bot, fscholz
最近更新: mdnwebdocs-bot,