SourceMap

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

SourceMap HTTP レスポンスヘッダーは、生成されたコードをソースマップにリンクし、ブラウザーが元のソースを再構成し、再構成されたオリジナルをデバッガに提示できるようにします。

ヘッダータイプ Response header
Forbidden header name いいえ

構文

SourceMap: <url>
X-SourceMap: <url> (deprecated)

ディレクティブ

<url>

(リクエスト URL に対する) 相対パスまたはソースマップファイルを指す絶対 URL

SourceMap: /path/to/file.js.map

仕様

仕様書 タイトル
Draft document Source Map Revision 3 Proposal

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
SourceMap

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.
Requires a vendor prefix or different name for use.
Has more compatibility info.

関連情報