Was browsing through apache logs and found interesting thing:
When a users access any page where I have included jquery, apache tries to get jquery-xxx.min.map file and failed with 404 error. Here is an example:
xxx.xxx.xxx - - [Date:TIME +0000] "GET /js/lib/jquery-1.10.2.min.map HTTP/1.1" 404 3134 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36"
This is not a surprise, because I clearly do not have this min.map file. I do not like this behavior.
Looking in jquery source code, I have found
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
First thing is that this sourceMappingURL is in the comment, and there is no other hits. When I just removed it, 404 error disappeared.
I have no questions that people from jquery knew what are they doing, but can anyone explain me:
what is the point of this sourceMappingURL which creates some connection which ends up with 404?
what am I loosing when I removed this line?
The only relevant thing I was able to found is this link and as far as I understood (please right me if I am wrong) that:
- it generates some errors in IE (I was viewing through Chrome)
- it is deprecated (I am using the latest version of jQuery at the time of being)
- it is used for debugging purposes (have not understood for what debugging purposes)