检查文件是否存在,但防止控制台中的404错误显示

是否可以通过 JavaScript 检查文件/页面是否存在,但是防止404错误显示在控制台中?

35282 次浏览

Seems like the answer is: No. Can't avoid getting a 404 error in the console unless you kick off a call to a server-side script to check file existence.