Check if file exists but prevent 404 error in console from showing up

Javascript

Javascript Problem Overview


Is it possible to check to see if a file/page exists via JavaScript but prevent the 404 Error from showing up in the console?

Javascript Solutions


Solution 1 - Javascript

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMuersView Question on Stackoverflow
Solution 1 - JavascriptMuersView Answer on Stackoverflow