jquery - Test if a file exists with javascript -


this question has answer here:

this question has been asked here , here. have tried 3 of answers no luck. using system called niagara acting web server, may reason these techniques did not work. nonetheless, feel there must way check existence of file, not existence of 404 or 200 or 0.

you can use $.ajax

$.ajax({   url: 'example.com/abc.html', //or url   success: function(data){     alert('exists');   },   error: function(data){     alert('does not exist');   }, }) 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

How can I fetch data from a web server in an android application? -

jquery - How can I dynamically add a browser tab? -