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

查看:33
本文介绍了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.mapjquery-2.0.3.min.map,但任何事情都可能发生)首先要知道的是,这仅在使用 DevTools 时请求.您的用户不会遇到此 404.

现在您可以修复此问题或禁用源映射功能.

修复:获取文件

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

道奇:禁用源图

您可以暂时在设置中完全禁用 JavaScript 源映射,而不是获取文件.如果您从不打算在此页面上调试 JavaScript,这是一个不错的选择.使用 DevTools 右下角的齿轮图标打开设置,然后:

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天全站免登陆