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

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

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -