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

  • Home
  • SEARCH
  • 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 6080865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:06:37+00:00 2026-05-23T11:06:37+00:00

In my webapp I need to check if another server (on a different ip

  • 0

In my webapp I need to check if another server (on a different ip address) is up. I know I can’t use direct ajax requests for this because of cross domain restrictions. I cannot use JSONP because I don’t have any control over the other server. I also need to repeatedly check for the server being up as it may be unavailable some of the time. All these don’t make it easy.

However since I only care about a request to the remote server succeeding (and I don’t care about any data that the server might return), I was hoping that it would be possible.

I can’t do this on the server side because the server side may or may not have visibility to the other server, what I really care about is that the client (web browser) have visibility.

I can append a new iframe to the page with the src equal to the remote server address but then how can I check when (IF) an iframe contents have been loaded successfully? Also how do I make periodic requests? By creating new iframes repeatedly? That seems quite unclean.

Is there any way to do this cleanly and reliably?

  • 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-23T11:06:38+00:00Added an answer on May 23, 2026 at 11:06 am
    function testServer(server, cb) {
        var img = new Image();
        img.onload = function() {
          cb.call(this, img);
        };
        img.src = server;
    }
    
    var url = "http://placekitten.com/200/300/"
    testServer(url, function _self(img) {
        if (img.naturalHeight === 200) {
            alert("win");    
        } else {
            setInterval(function() {
                testServer(url, _self);
            }, 10000);
        }
    });
    

    You want to load an Image from a remote server then check that the image height or whatever is what you expect it is.

    If you can’t place an image on the remote server then you will need to use CORS

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

Sidebar

Related Questions

How can i know upper bound of requests per second my webapp can handle
I am making a web-app using GlassFish. In this webapp I need to be
# I need this behaviour: # 1) check if the service from flash is
I'm doing a webapp and need a backup plan. Here's what I've got so
I plan on building a simple, yet high usage webapp and need to settle
I need to build a little webapp but I'm not sure what is the
I need to get UTF-8 working in my Java webapp (servlets + JSP, no
As a homework i need to make a webapp that will play an mp3
Does anyone check the domain of an email address as part of their verification
I have a strange need, a customer asked me to implement a webapp to

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.