Online Status

Back to Main

Your Current Online Status

Loading...

Technical Classification

Type: JavaScript Property (navigator.onLine)

Data Source: Browser Network Stack / Operating System

When Available: Always accessible via JavaScript

Return Type: Boolean (true or false)

Background & Purpose

The navigator.onLine property returns a boolean value indicating whether the browser is currently connected to a network. It's part of the HTML5 specification and provides a simple way to detect network connectivity status.

Historical Context:

Important Limitations:

Return Values & Meanings

Possible Values:

Value Meaning Scenarios
true Browser is connected to a network • Connected to Wi-Fi
• Connected via Ethernet
• Mobile data connection active
• Local network (may not have internet)
false Browser is not connected to any network • Airplane mode enabled
• Wi-Fi/Ethernet disconnected
• Network adapter disabled
• "Work Offline" mode in browser

Edge Cases:

Common Uses

Legitimate Uses:

Event Listeners:

Applications can listen for connectivity changes using events:

Example Use Case:

A note-taking app checks navigator.onLine before syncing. If offline, notes are saved locally and synced automatically when connection is restored.

Platform Differences

How Online Status is Determined:

Platform/Browser Detection Method Accuracy Notes
Chrome (Desktop) OS network stack Reliable, updates quickly
Firefox (Desktop) OS network stack Reliable, consistent behavior
Safari (macOS) System network status Very accurate with macOS integration
Edge Windows network stack Reliable on Windows
Mobile Browsers Mobile OS network APIs May have slight delays detecting changes
Older Browsers Basic network checks Less reliable, slower updates

Platform-Specific Behaviors:

Privacy Implications

Tracking Risk: LOW

Privacy Concerns:

Why Low Risk:

Limited Tracking Value:

User Control & Protection

How to Control Online Status:

Manual Offline Mode:

System-Level Controls:

  1. Airplane Mode: Disables all network connectivity
  2. Disable Adapters: Turn off Wi-Fi or Ethernet in system settings
  3. Disconnect Network: Physically disconnect Ethernet or turn off router

Developer Tools:

Privacy Implications of Control:

Best Practices for Developers:

Additional Resources