在用apache设置的域上有一个密码:
<Directory "dirname goes here">
AllowOverride AuthConfig
AuthType Basic
AuthName "Authentication Required"
AuthUserFile "filename goes here"
Require valid-user
Order allow,deny
Allow from all
</Directory>
index.html 中有这个:
<script src = "js/jquery.min.js"></script>
index2.html 中有这个:
<script src = "js/jquery.min.js"></script>
只有在 index2.html 上我才会在 chrome 控制台中收到此错误:
GET http://example.com/page/js/jquery.min.map 401(需要授权)
index.html 工作正常。
- 什么是
jquery.min.map
? - 为什么我会收到 401 错误?
最佳答案
您使用的是谷歌浏览器吗?
- 打开你的 inspector 元素
- 转到设置(在右上角)
- 取消选中启用 JavaScript 源映射
尝试
关于javascript - 不能包含 javascript(401 错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18750519/