Open In App

HTTP headers | SourceMap

The HTTP SourceMap header is a response-type header used to map original source from the transformed source. For example, the Javascript resources are transformed to some other source from its original by the browsers at the time of execution. In the process of debugging, it is too difficult to debug a transformed source. On the other hand, the original source can be easily debugged. Hence, the SourceMap header is used to obtain the original source. SourceMap header enables the browser to reconstruct the original source from the transformed source and present it in the debugger. It links the generated code with the source code.

Syntax:



SourceMap: <url>

Directives: The HTTP SourceMap header accepts a single directive mentioned above and described below:

Example:



Supported Browsers: The browsers are compatible with the HTTP SourceMap Header are listed below:

Article Tags :