admin管理员组文章数量:1289881
I have some js/html/css that will in certain situations, encounter harmless 403 errors when loading images.
Is there any way to catch these errors and to prevent them from logging errors to the console?
Thanks!
I have some js/html/css that will in certain situations, encounter harmless 403 errors when loading images.
Is there any way to catch these errors and to prevent them from logging errors to the console?
Thanks!
Share Improve this question asked Aug 9, 2013 at 19:15 asutherlandasutherland 2,9694 gold badges38 silver badges51 bronze badges1 Answer
Reset to default 12Nope. If the server responds with just about anything other than a 200, you are going to see it in the console. You will need to fix it on the server side.
Also, 403 errors are typically far from "harmless"- it literally means that there are "Forbidden" requests going out. While it may be meaningless to the functionality/content of your app/site, those requests should either 1) not be requested in the first place, or 2) be handled by your app to let the user know they don't have permission.
本文标签: javascriptPossible to prevent 403 errors from logging to the web consoleStack Overflow
版权声明:本文标题:javascript - Possible to prevent 403 errors from logging to the web console? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741415640a2377492.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论