jQuery的jquery-1.10.2.min.map触发了404(未找到) [英] jQuery's jquery-1.10.2.min.map is triggering a 404 (Not Found)

查看:308
本文介绍了jQuery的jquery-1.10.2.min.map触发了404(未找到)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到有关文件的错误消息, min.map ,找不到:


GET jQuery的jquery-1.10.2.min.map触发404(未找到)







截图





这是从哪里来的?

解决方案

如果Chrome DevTools报告的是.map文件的404(可能 jquery-1.10.2.min.map jquery.min.map jquery-2.0.3.min.map ,但可以发生任何事情)首先要知道的是,这只是在使用DevTools时才会被请求。
您的用户不会点击此404。



现在您可以解决此问题或禁用源地图功能。



修复:获取文件



接下来,这是一个简单的修复。前往



道奇:禁用源图



您也可以禁用JavaScript,而不是获取文件在您的设置中,源映射完全是现在。如果您从未计划在此页面上调试JavaScript,那么这是一个很好的选择。
使用DevTools右下角的cog图标打开设置,然后:


I'm seeing error messages about a file, min.map, being not found:

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


Screenshot

Where is this coming from?

解决方案

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:

这篇关于jQuery的jquery-1.10.2.min.map触发了404(未找到)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆