0
votes

I am loading the minified jquery script from Google CDN at //ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js

However, when I load my page on the browser, according to chrome developer tools, it looks as though the standard jquery (non-minified) file is being loaded. Why is this happening? The jquery is also trying to load an image which does not exist (css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png)

2
"The jquery is also trying to load an image which does not exist" that's jQuery UI, completely different library.Kevin B

2 Answers

3
votes

It's actually more awesome than just reindenting and reformating the code.

The secret is a JavaScript Source Map, that enables developers to link a minified file to its original source so that the debugger is able to display the original ungarbled code.
The technique is detailed here :
http://devtoolsecrets.com/secret/debugging-use-javascript-source-maps.html

If you go to the network panel, you'll see that the file loaded is actually the minified one, and if you look at the header of this file, it contains the source map declaration :

/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
1
votes

Do you have your developer tool set to "pretty print"? This will take JavaScript code and add newlines and proper tab spacing to make the code look pretty even though it may not be.