[fix]-jQuery jquery-1.10.2.min.map is triggering a 404 (Not Found)

Wikitechy | 4242 Views | jquery | 01 Jun 2016

 

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:

  • jquery 1.11
  • jquery 1.12
  • jquery 2.0
  • jquery 2.1
  • jquery 2.2

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
  • jquery.min.map missing





Workshop

Bug Bounty
IOT Hackathon
Webinar

Join our Community

Advertise