[fix]-jQuery jquery-1.10.2.min.map is triggering a 404 (Not Found)
Scenario:
The error occurs when moving the files to the production server.
Error:
jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)]
Fix 1:
The error can be avoided by deleting the below line from the JavaScript file
//@ sourceMappingURL=jquery-1.10.2.min.map
The part of the jQuery file that contains the above line will look like as shown below:
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery-1.10.2.min.map
*/
Modify it as shown below:
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */
Fix 2:
The version of the .map file needs to be updated as shown below.
Existing: jquery-1.9.1.min.map
Updated to: jquery.min.map
Fixes are applicable to the following versions of jquery:
Related Error Tags:
- #14415 (Remove sourcemap comment) – jQuery
- jquery-1.10.2.min.map 404 Not found on several themes
- jquery-1.10.1.min.map not found