# 7-Secs: Lightning Speed Test > Lightning fast internet speed test in just 7 seconds. Check your download speed instantly with our free, no-app-needed speed checker. ## Overview 7-Secs is a lightweight, mobile-first web application designed to measure internet connection speeds (both download throughput and latency) as quickly and efficiently as possible. Unlike traditional speed tests that can take 30-60 seconds, 7-Secs leverages modern Web APIs to deliver accurate real-world download speed metrics in just 7 seconds. ## Key Features - **Blazing Fast Testing:** Completes an initial download speed test in 7 seconds. - **Extended Testing Option:** Allows continuing for a full 15-second extended test for more sustained measurement. - **Multi-CDN Latency Ping:** Measures connectivity and latency against 5 major global infrastructure providers (Google, Cloudflare, AWS, Microsoft, Apple). - **Progressive Web App (PWA):** Fully installable on iOS and Android without an app store, complete with a service worker (`sw.js`) and web app manifest (`manifest.json`). - **Zero Bloat:** Entire payload is under 50KB, implemented entirely in vanilla HTML, CSS, and JavaScript without any external frameworks (React, Vue, etc.) or trackers. - **Rich User Interface:** - Modern dark-themed UI with fluid CSS animations. - Canvas-based light streaks background animation. - Tabular navigation for Speed, Latency (Ping), Details, and History. ## Technical Architecture The application is entirely client-side and consists of three primary files: ### 1. `index.html` This file acts as the main entry point and contains the complete application logic, styles, and markup. * **CSS Styles:** Contains extensive styling using custom properties (CSS variables) for easy theming. Features responsive design tailored for mobile devices and includes smooth keyframe animations (`fadeIn`, `pulse`). * **Background Animation:** Uses an HTML5 `` element (ID `lightCanvas`) to draw moving light streaks dynamically via `requestAnimationFrame`. * **Speed Test Logic:** * **Endpoint:** Uses Cloudflare's speed test endpoint (`https://speed.cloudflare.com/__down`). * **Parallel Streams:** Initiates 6 parallel download streams fetching 2MB chunks to fully saturate the user's connection. * **Measurement:** Calculates speed in Mbps by measuring bytes downloaded over time, providing real-time updates every 400ms. * **Connectivity Checks:** Sends `no-cors` fetch requests to endpoints like `generate_204` or `favicon.ico` on major provider domains to calculate latency in milliseconds. * **Local Storage:** Stores test history and logs in the browser's `localStorage` and `sessionStorage`. ### 2. `manifest.json` The Web App Manifest configures the application for PWA installation, defining the app's name, icons, theme colors, and display mode (standalone). ### 3. `sw.js` The Service Worker enables offline caching and ensures the application can load even when the user has no internet connection, fulfilling the requirements for a complete PWA. ## API Usage for AI Agents When interacting with this codebase, keep the following constraints and patterns in mind: - **No Build Tools:** This is a zero-build-step project. Modifications should be made directly to `index.html`. - **Vanilla JS:** All DOM manipulation and event handling relies on standard Web APIs (`document.getElementById`, `addEventListener`). - **Modern Features:** The codebase heavily uses modern JavaScript features like `async/await`, `fetch`, `AbortController` (for canceling ongoing speed tests), and the Streams API (`response.body.getReader()`). ## External Endpoints - `https://speed.cloudflare.com/__down`: Used for measuring download throughput. - `https://www.google.com/generate_204`: Google connectivity check. - `https://cloudflare.com/cdn-cgi/trace`: Cloudflare connectivity check. - `https://aws.amazon.com/favicon.ico`: AWS connectivity check. - `https://www.microsoft.com/favicon.ico`: Microsoft connectivity check. - `https://www.apple.com/favicon.ico`: Apple connectivity check.