Member Avatar for ziyaddinsadigov

Hi, guys, i want to check - url exists or not and i want to do it witj AJAX. What code I must use for it?

What do you mean check URL?

AJAX simply allows you to initiate communication with a page on the web server and retrieve data without having to reload the page. Please explain what you are trying to do.

Member Avatar for ziyaddinsadigov

I want to test - url exists or not. For example, dfifhprthsugdfpisudgf.com exists or not? it will say - "no, url doesn't exist!", if url - google.com, it will say - "yes, url exists!".

Due to browser security AJAX request can only be made to the same domain. That this if you domain is mydomain.com you won't be able to make an AJAX request to google.com.

To do this kind of verification, you need to have a server-side script that will make the validation, and your interface will make an AJAX request to that script.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.