jquery.min.map is triggering a 404 (Not Found)
来源:互联网 发布:我的世界数据标签 编辑:程序博客网 时间:2024/05/01 22:03
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.
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:
Or
You can remove the 404 by removing the line
//@ sourceMappingURL=jquery-1.10.2.min.map
from the top part of your jQuery file.
The top part of the jQuery file will look like this.
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license//@ sourceMappingURL=jquery-1.10.2.min.map*/
Just change that to
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license */
Purpose of a source map
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. (Read more on this here)
更详细的中文介绍请参考阮一峰博客文章:http://www.ruanyifeng.com/blog/2013/01/javascript_source_map.html- jquery.min.map is triggering a 404 (Not Found)
- jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)
- jquery.min.map 404 (Not Found)
- 解决jquery-1.10.2.min.map 404 Not Found错误
- 导致jquery.min.map 404 (Not Found)错误的原因
- jQuery-1.9+.min.map 404 (Not Found) 错误,了解Source Map
- jquery-1.10.2.min.map 404 (Not Found)问题及解决
- jquery-1.10.2.min.map 404 (Not Found)问题及解决
- TypeError: a(...).live is not a function(jquery.unobtrusive-ajax.min.js 引入报错)
- jquery-ui.min.js:5 Uncaught TypeError: b.nodeName.toLowerCase is not a function
- jquery.min.js:2 Uncaught TypeError: $(...).DataTable is not a function
- jquery.min.map 404 原因
- Chrome调试时提示angular.min.js.map 404 (Not Found)问题的解决
- jquery.easyui.min.js:ncaught ReferenceError: jQuery is not defined
- GET http://test01.com/jquery-1.9.1.min.js [HTTP/1.1 404 Not Found 3ms]
- jQuery-$ is not a function
- bash [[: not found, '[[' is a keyword not a builtin
- error C2039: 'min' : is not a member of 'std'
- Wifi直连
- JSONKit使用方法
- WM_PAINT消息总结
- ibatis应对的批量操作
- 关于AISR的开发(Android)
- jquery.min.map is triggering a 404 (Not Found)
- java垃圾回收那点事(五)ParallelGCThreads参数
- WAMP配置笔记,Apache开启.htaccess支持,通过vhost文件管理本地多个站点
- CPU大小端问题
- 探秘腾讯Android手机游戏平台之不安装游戏APK直接启动法
- 仿百度搜索自动输入提示功能JQuery Autocomplete
- Android--自定义带点击事件监控的Spinner控件
- extern "C"
- WebSocket 规范