js-apis
“non-hardware” APIs
Yes—browsers expose dozens of other “non-hardware” APIs that SPAs routinely lean on.
Here is a concise checklist (one-liner each) of the best-known ones, grouped by theme:
Storage & state
localStorage/sessionStorage– key/value strings, ~5–10 MBIndexedDB– large, async, transactional object storeCacheStorage– programmatic HTTP cache (Service Worker)Cookie Store API– modern promise-based cookie RW (Chromium)
Network & transport
WebSocket– full-duplex TCP-like socket over HTTPServer-Sent Events (EventSource)– one-way push from serverFetch/Request/Response– replacement for XHR, streams supportedXMLHttpRequest– legacy but still usedBeacon– fire-and-forget POST (analytics, unload)Background Sync– replay requests when back onlineWebTransport– QUIC-based WebSocket successor (low-latency streams)
Process & compute
Web Workers– OS thread, no DOM accessSharedArrayBuffer+Atomics– memory shared between threadsOffscreenCanvas– GPU rendering in a workerWebAssembly– run C++/Rust at near-native speedCompute Pressure– observe CPU load (origin trial)
Media & capture
MediaDevices.getUserMedia– camera / micMediaRecorder– encode chunks to WebM/MP4 in-browserWebCodecs– low-level audio/video encode/decodeImageCapture– grab stills from camera with full controlScreen Capture(getDisplayMedia) – record/tab-cast
Files & drag-and-drop
File/FileReader/FileWriter– read user-selected filesFile System Access API– r/w real disk files & foldersDrag-and-Drop– native desktop-to-browser file drop
Notifications & engagement
Notifications– system-level toastPush API– re-engage users from server (requires SW)Page Visibility– detect tab switch / minimizeIdle Detection– know when user is away
Performance & diagnostics
Performance/PerformanceObserver– navigation, resource, paint, long-task, INPUser-Timing– custom marks & measuresNetInfo– downlink, rtt, save-data hintReporting API– browser sends CSP/deprecation crashes to endpoint
Security & credentials
Credential Management– auto-sign-in with saved passwordsWebAuthn– FIDO2 / Passkey public-key loginPermissions– query & request fine-grained rights
Intl & text
Intl.*– collation, date/time, number, list, segmenterEncoding API– TextEncoder/TextDecoder (UTF-8, etc.)
This list plus the earlier hardware APIs give you the full modern browser “toolbox” for SPAs.
Hardware APIs
Modern SPAs can tap the following built-in JavaScript / Web APIs to reach real hardware or OS-level features without leaving the browser:
- WebGPU – GPU compute & 3-D rendering (CUDA / ML-class workloads)
- WebGL / WebGL2 – hardware-accelerated 2-D/3-D graphics
- WebXR – VR/AR headsets, motion controllers, room-scale tracking
- Web Audio + Web MIDI – audio I/O, MIDI instruments, low-latency DSP
- WebHID – raw access to human-interface devices (joysticks, pedals, etc.)
- WebUSB – talk to USB devices (3-D printers, micro-controllers)
- WebSerial – direct serial port for IoT, Arduino, Pi
- WebBluetooth – pair with BLE peripherals (heart-rate, bulbs, drones)
- WebNFC – read/write NFC tags on phones & kiosks
- Geolocation – GPS / GLONASS / Galileo coordinates
- DeviceOrientation / DeviceMotion – accelerometer, gyro, compass
- AmbientLight & Proximity – light & distance sensors (mobile)
- WebRTC – camera, mic, peer-to-peer streaming
- Shape Detection (Barcode/Face/Text) – hardware-accelerated recognition
- WebCodecs – low-level video encode/decode for camera pipelines
- WebShare / WebShare Target – native share sheet & file receipt
- Contact Picker – select phone contacts
- WebOTP – read SMS verification codes
- Battery Status – monitor battery level & charging state
- Network Information – connection type, speed, metered hints
- WakeLock – keep screen or system awake
- WebAssembly SIMD & Threads – near-native CPU vector & parallel work
These APIs are exposed directly through navigator.* or window.* and work inside any modern SPA built with React, Vue, Angular, Svelte, etc.