2

I really wanted to know how does browser download source map files?

I got many information around when does browser download it. But not any info on how? means does browser makes http get request? or how can I observe that request of browser requesting abc.js.map file?

Any guidance will be very helpful. thanks.

Gonzalo Matheu
  • 8,984
  • 5
  • 35
  • 58
Denzz
  • 1,025
  • 2
  • 11
  • 18
  • Source maps can be stored in a separate file or [inline with the deployed file](https://stackoverflow.com/questions/27671390/why-inline-source-maps). I imagine it _must_ be making an HTTP request in order to access the file. However, I don't think it will show up as a Network tab request because it is browser implementation, not code executed from the JS. Unfortunately, [this unanswered SO post](https://stackoverflow.com/questions/34138737/debug-source-maps-loading-on-chrome) on a similar topic gives me little hope that there is an easy way to debug sourcemap loading... – Alexander Nied Feb 01 '18 at 04:25

1 Answers1

0

The browser makes a normal GET request, doesn't show it in the Network tab, but you can see it on the server logs.

With Apache, I can find in /var/log/httpd/access.log

"GET /js/showdown.min.js.map HTTP/1.1" 
lolesque
  • 10,693
  • 5
  • 42
  • 42