A real-time network monitoring tool built with vanilla JavaScript that allows you to check website availability, latency, and response times with a clean, modern UI.
- Real-time Monitoring: Continuously monitor website availability and performance
- Latency Tracking: Measure and track network latency over time
- Response Time Analysis: Monitor website response times with detailed metrics
- Visual Analytics:
- Interactive charts showing latency and response time history
- Color-coded status indicators
- Comprehensive history table
- Error Handling: Robust error detection and reporting with automatic retry capability
- Cross-Origin Support: Works with CORS-enabled and restricted sites
- Responsive Design: Clean, modern UI that works on all device sizes
- Vanilla JavaScript (ES6+)
- Chart.js for data visualization
- TailwindCSS for styling
- No backend required - runs entirely in the browser
- Clone the repository:
git clone https://github.com/jeffasante/pingit.git
cd pingit
- Open with a local server:
# Using Python
python -m http.server 5500
# Or using Node.js http-server
npx http-server
- Visit
http://localhost:5500
in your browser
- Enter a URL in the input field (e.g., "google.com" or "https://example.com")
- Click "Check Status" or press Enter
- Monitor real-time statistics:
- Current latency
- Site status
- Response time
- Historical data
The core functionality is handled by the NetworkStatusChecker
class, which provides:
- Configurable ping intervals and timeouts
- Automatic retry attempts for failed checks
- Event-based status updates
- Error handling and reporting
-
URL Validation and Formatting
- Automatic protocol (https://) addition if not specified
- URL format validation
-
Status Monitoring
- Site availability checking
- Latency measurement
- Response time tracking
- Status code reporting
-
Data Visualization
- Real-time chart updates
- Historical data tracking
- Performance trending
-
Error Handling
- CORS compatibility
- Network error detection
- Timeout management
- Automatic retries
Key constants that can be modified:
const MAX_DATA_POINTS = 20; // Maximum number of historical data points
const CHART_UPDATE_INTERVAL = 5000; // Update interval in milliseconds
// NetworkStatusChecker options
{
pingInterval: 5000, // How often to check (ms)
timeout: 5000, // Request timeout (ms)
retryAttempts: 2, // Number of retry attempts
retryDelay: 1000 // Delay between retries (ms)
}
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Chart.js for the charting library
- TailwindCSS for the UI framework