1

I'm including jQuery via this Google CDN:

//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js

The only reason I'm using jQuery is because of Bootstrap, which I'm loading from this CDN:

//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js

The problem is that whenever my page loads, the slowest file to come is jquery.min.map. which returns a 304 GET and takes over 50ms to load. I understand Javascript maps are to debug obfuscated/minified code? Not sure why I'd need this in a production application.

Thanks!

Carpetfizz
  • 8,707
  • 22
  • 85
  • 146

2 Answers2

4

The file is being loaded by your debug tools in the browser. You can disable it in the options.

enter image description here

epascarello
  • 204,599
  • 20
  • 195
  • 236
  • Thanks, but will others' browsers have this disabled by default? – Carpetfizz Jan 24 '14 at 01:59
  • 1
    @Carpetfizz No, of course, see the second line of the jQuery file, `//@ sourceMappingURL=jquery.min.map`, if you remove this line browser doesn't load the source map, but for doing this you should not use CDN, as you can't modify the file. That being said, not all the users use their browsers' console and loading source maps doesn't hurt your app. – Ram Jan 24 '14 at 02:13
  • Okay cool thanks. I thought it loaded even without the console open. – Carpetfizz Jan 24 '14 at 03:03
3

No one says you need it. They are requested by your browser's debugger tools.

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247