aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/sourcemap/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/http/headers/sourcemap/index.html')
-rw-r--r--files/zh-cn/web/http/headers/sourcemap/index.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/files/zh-cn/web/http/headers/sourcemap/index.html b/files/zh-cn/web/http/headers/sourcemap/index.html
new file mode 100644
index 0000000000..e5a77ef625
--- /dev/null
+++ b/files/zh-cn/web/http/headers/sourcemap/index.html
@@ -0,0 +1,65 @@
+---
+title: SourceMap
+slug: Web/HTTP/Headers/SourceMap
+translation_of: Web/HTTP/Headers/SourceMap
+---
+<div>{{HTTPSidebar}}</div>
+
+<p><strong><code>SourceMap</code></strong> <a href="/en-US/docs/Web/HTTP">HTTP</a> 响应头链接生成的代码到一个 <a href="/en-US/docs/Tools/Debugger/How_to/Use_a_source_map">source map</a>,使浏览器能够重建原始的资源然后显示在调试器里。</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Header 类型</th>
+ <td>{{Glossary("Response header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}</th>
+ <td>no</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox">SourceMap: &lt;url&gt;
+X-SourceMap: &lt;url&gt; (deprecated)
+</pre>
+
+<h3 id="指令">指令</h3>
+
+<dl>
+ <dt><code>&lt;url&gt;</code></dt>
+ <dd>指向一个source map文件的一个相对(于请求的URL)或者一个绝对的URL。</dd>
+</dl>
+
+<h2 id="例子">例子</h2>
+
+<pre>SourceMap: /path/to/file.js.map</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Title</th>
+ </tr>
+ <tr>
+ <td><a href="https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k">Draft document</a></td>
+ <td>Source Map Revision 3 Proposal</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
+
+<p>{{Compat("http.headers.SourceMap")}}</p>
+
+<h2 id="另请参阅">另请参阅</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Tools/Debugger/How_to/Use_a_source_map">Firefox Developer Tools: using a source map</a></li>
+</ul>