Missing .map resource?
JavascriptJqueryHtmlJavascript Problem Overview
I've recently started having this problem with all my projects. When my index page loads which contains a reference to the jquery source file, my console logs this error: GET http://localhost:3000/js/lib/jquery-1.10.2.min.map 500 (Internal Server Error)
.
This doesn't affect my application at all, but it's really annoying to see whenever I open up the console. Does anyone know where this is coming from?
Edit: Note that I'm not explicitly referencing the .map file, I am just pointing to <script src="js/lib/jquery-1.10.2.min.js"></script>
Javascript Solutions
Solution 1 - Javascript
jQuery recently started using source maps.
For example, let's look at the minified jQuery 2.0.3 file's first few lines.
/*! jQuery v2.0.3 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
Excerpt from Introduction to JavaScript Source Maps:
> Have you ever found yourself wishing you could keep your client-side > code readable and more importantly debuggable even after you've > combined and minified it, without impacting performance? Well now you > can through the magic of source maps. > > Basically it's a way to map a combined/minified file back to an > unbuilt state. When you build for production, along with minifying and > combining your JavaScript files, you generate a source map which holds > information about your original files. When you query a certain line > and column number in your generated JavaScript you can do a lookup in > the source map which returns the original location. Developer tools > (currently WebKit nightly builds, Google Chrome, or Firefox 23+) can > parse the source map automatically and make it appear as though you're > running unminified and uncombined files.
emphasis mine
It's incredibly useful, and will only download if the user opens dev tools.
Solution
Remove the source mapping line, or do nothing. It isn't really a problem.
Side note: your server should return 404, not 500. It could point to a security problem if this happens in production.
Solution 2 - Javascript
I had similar expirience like yours. I have Denwer server. When I loaded my http://new.new local site without using via script src jquery.min.js file at index.php in Chrome I got error 500 jquery.min.map in console. I resolved this problem simply - I disabled extension Wunderlist in Chrome and voila - I never see this error more. Although, No, I found this error again - when Wunderlist have been on again. So, check your extensions and try to disable all of them or some of them or one by one. Good luck!