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 8002977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:31:52+00:00 2026-06-04T16:31:52+00:00

This is related to my previous question, but will navigator.onLine work if there is

  • 0

This is related to my previous question, but will navigator.onLine work if there is a bad connection? For example, the device is connected to a router, but no pages will load, or anything else that will bring an error that tells the user to check their connection. I know navigator.onLine works when completely disabling a connection, but there just isn’t a way to simulate a bad connection unless you experience a bad connection. If it doesn’t work, are there any tests I could do with javascript to ping a server?

  • 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-06-04T16:31:54+00:00Added an answer on June 4, 2026 at 4:31 pm

    From the documentation:

    In Chrome and Safari, if the browser is not able to connect to a local
    area network (LAN) or a router, it is offline; all other conditions
    return true. So while you can assume that the browser is offline when
    it returns a false value, you cannot assume that a true value
    necessarily means that the browser can access the internet.

    In other words, a bad connection will return true.

    To answer your second question, yes, you can ping a server with an AJAX call to your server. If it is successful (you get a response back) then you know the browser is online. If it times out, the user could be experiencing a bad connection.

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

Sidebar

Related Questions

This is related to my previous question , but a different one. I have
Very much related to my previous question , but I found this to be
This is related to a previous question, and surprisingly, I couldn't find an example
This is related question to my previous question but different one. After searching a
this is related to: a previous question BUT the question is my code only
This question is related to my previous question but you dont need to read
This is somewhat related to my previous question but I've realised that I needed
This is kind of related to my previous question, but not really. I have
This is related to my previous question but i can't able to get solution
This is related to my previous question I'm solving UVA's Edit Step Ladders and

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.