[Reserved] solve jquery-1.10.2.min.map 404 Not Found error

Recent experience problems writing code, being given that jquery-1.10.2.min.map NOT FOUND. I checked out a few times but found the code in the code is no problem, but did not contain even mention jquert-1.10.2.min.map this file, go online to search a bit to find the cause of the problem lies:

First .map file is the sort of person, min.map file is in the compressed file to restore the original file is not a partner js file compression related variables exist, which is the variable name of the file to replace the corresponding information, where the variable position , etc. meta information file data, and general files min.js this master file in the same directory. If you find .min.map file does not exist, jquery will detect whether the browser supports the source map feature, if supported, then go download the source map file, such as chrome browser support this operation; the premise that support this feature use min.js file official website, for example, I seemingly not the official website of the file would have been used in error

This error is only encountered when using jquery.min.js this error, when using uncompressed files will not, because of the problems that arise in the compression of time. Solution There are several available online:

 

1. uncompressed JS files, but compared to the impact of non-compressed and .min.js transmission speed, so trade-offs;

 

2. On the official website to download .min.map file;

 

3.chrome browser shutdown download source map options, the specific operation bit chrome-> Developer Options -> lower right corner of the Settings -> closed source map js function, for example, I am using this, very good but a little is not only an error on my current browser, to change other people's browsers still will complain, so the need to use other ways to modify;

 

4. Remove the compressed js file references in min.map that remove the comment // @ sourceMappingURL = jquery-1.10.2.min.map, online say that this is the optimal solution

 

Original link: http: //www.aichengxu.com/view/1380

Guess you like

Origin www.cnblogs.com/njflash/p/11768940.html