Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7437543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:24:55+00:00 2026-05-29T10:24:55+00:00

Using Javascript or jQuery, how can I check if an external link is available?

  • 0

Using Javascript or jQuery, how can I check if an external link is available?

An $.ajax() call is not available as it violates SOP (same problem as here). I have read about JSONP, but I would like to know if there is a more straight solution, as I don’t want to load any data from the external server; what I need is only to check if it is reachable.


EDIT (answer)

I solved it with the following code:

$.ajax({url: 'http://www.example.com',
        type: 'GET',
        dataType: 'jsonp',
        complete: function(jqXHR, textStatus) {
                console.log(jqXHR.status);  // '200' = url reachable
        },
        timeout: 2000
});

The only problem now is that I get a Parse error, but in any case it can be checked if the external link is working.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:24:56+00:00Added an answer on May 29, 2026 at 10:24 am

    You could use YQL to check if a URL is available via its JSONP interface.

    YQL Console.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I manipulate using JavaScript (JQuery) a site, not in my server, that
How can I check if an input field is selected or not, using javascript
How can I check to see if domain names are available using Javascript or
I'm trying to make a drop down menu using javascript/jquery but can't get my
How can you copy text to clipboard using Javascript (or even nicer a jQuery
In a htmlpage using jQuery or JavaScript how can the following be achieved? User
How can I change CSS from javascript . I'm using jQuery-ui Dialog and I
I've rewritten my family web site using JavaScript (JQuery) making Ajax calls to PHP
How can i validate a mail id is a gmail id using javascript/jquery/regex. For
Using javascript or jquery, how can I make a Required Field Validator control (of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.