Jquery's Jquery-1.10.2.Min.Map Is Triggering a 404 (Not Found)

jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)

If Chrome DevTools is reporting a 404 for a .map file (maybe jquery-1.10.2.min.map, jquery.min.map or jquery-2.0.3.min.map, but can happen with anything) first thing to know is this is only requested when using the DevTools.
Your users will not be hitting this 404.

Now you can fix this or disable the sourcemap functionality.

Fix: get the files

Next, it's an easy fix. Head to http://jquery.com/download/ and click the Download the map file link for your version, and you'll want the uncompressed file downloaded as well.

Sample Image

Having the map file in place allows you do debug your minified jQuery via the original sources, which will save a lot of time and frustration if you don't like dealing with variable names like a and c.

More about sourcemaps here: An Introduction to JavaScript Source Maps

Dodge: disable sourcemaps

Instead of getting the files, you can alternatively disable JavaScript source maps completely for now, in your settings. This is a fine choice if you never plan on debugging JavaScript on this page.
Use the cog icon in the bottom right of the DevTools, to open settings, then:
Sample Image

Error 'jquery-2.0.2.min.map not found'

1. Download the map file and uncompressed version of jquery. Put them with minified version.
JavaScript

2. Include minified version into your HTML
HTML

3. Check in Chrome
Chrome

4. Read Introduction to JavaScript Source Maps

5. Get familiar with Debugging JavaScript

jQuery min v1.10.1 error reading jquery-1.10.1.min.map not found

You can use the map file for debugging purposes in the console of any modern browser and don't need to include the unminified version of jquery.

If you don't need it, simply remove sourceMappingURL in the jquery file, otherwise you can download the map file on jquery.com.

sourceMappingURL from jquery generates 404 error in apache

There are several ways to remove the error.

  1. By default Chrome will enable source maps. You can disable this by opening the Developer Tools and changing the general settings. Uncheck the Enable source maps option. This of course won't fix the error on Apache.

  2. Change your pages to use a CDN served by jQuery or Google rather than using a local version. This will stop your local Apache from showing the issue in your logs.

  3. Alternatively, you will have to rewrite the comment at the top of your local version of jquery-1.10-2.min.js to stop this error. Otherwise you'll need to wait for a patch by jQuery.

From:

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

To:

/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */

sourceMappingURL is an HTML5 feature which has under gone some changes in the last months.

  • More info on sourceMappingURL: Introduction to JavaScript Source Maps, March 2012

  • See the following link related to recent changes to sourceMappingURL:
    sourceMappingURL and sourceURL syntax changed, June 2013

Source map request causes 404 error

Source maps are only loaded by Chrome when the developer tools are opened, so it shouldn't be an issue for your users.

jquery and bootstrap 404 not found

The .map file is being loaded in jquery.min.js from the following line:

//@ sourceMappingURL=jquery-1.10.2.min.map

And from the following line in bootstrap.css:

/*# sourceMappingURL=bootstrap.css.map */

Either remove those lines, or upload the map files to your production web server. You can get the map files from the official jQuery or Bootstrap downloads.

Jquery ajax is giving me a 404 not found error

Okay.... so it seems that I have to fully qualify the name in the url like so:

var folder = "127.0.0.1:8020/Ljf/assets/photos/7thAnnual";

instead of using just:

var folder = "Ljf/assets/photos/7thAnnual"

This answer brings a

"Cross origin requests are only supported for protocol schemes: http,
data, chrome, chrome-extension, https, chrome-extension-resource."

which is a different issue than this post, but it does solve the

404 not found

So I'll mark it as the answer

GET 404 not found jquery Autocomplete

Using proper versions of jquery and especially jquery ui solved the issue.

Reference 404 error for a request for the jquery.min.map file

Source maps are like favicons, a thing that will be loaded by browsers in some circumstances.

Typically, javascript are minified on production servers and debugging javascript on them is difficult.

Source maps are the original versions of minified javascript. It's up to the developers to include them or not on their websites.

In Chrome, you have to activate this functionality for the browser to attempt to download the original non-minified version of a minified script. It is then easier to debug client-side.

Basically, you can't get rid of this error besides providing source maps.

Anyways, see: http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/



Related Topics



Leave a reply



Submit