How to check if a file exists on the current site?
how
if ('http://site.com/girlfirend.png' exist) { // do something }
Maybe I can use .get? But how to check its status (ok or 404)?
.get
Thank.
Issue a request for a file and check the result.
See Ajax in jquery
Use jQuery, the following message is given here:
How to check if a file exists in javascript?
Source: https://habr.com/ru/post/1750455/More articles:JAXB code generation: limited type -> how to remove a zero occurrence field? - javaAre these the steps I must take to finally program the iPhone? - objective-cTrailing slashes: yes or no? - urlWhat is the .NET equivalent of PHP memory_get_usage? - asp.netCSS styles in Silverlight - cssempty () returns TRUE for the object a non-empty property - objectStatic and overriding in Java - javaOpening iWorks Documents on iPad UIWebView - objective-cA persistent subclass as a superclass using Hibernate - inheritanceIs there a way to prevent triggers from being turned on? - sqlAll Articles