Posts

Tutorial Chat Web App Client (PWA) Demonstrating Advanced Web APIs (WebSockets, Service Workers, Web Push, and IndexedDB)

Quick Info Live Demo: Tutorial Chat Web App (PWA) ↗ (Deployed on free tier Netlify) Contents Introduction Instructions To Test Offline, Background, And Push Features Of App Author Introduction This tutorial chat app demonstrates how to build resilient real-time communication web clients using Advanced Web APIs (WebSockets, Service Workers, Web Push and IndexedDB). It is designed as a responsive Progressive Web App (PWA) that functions on desktop and mobile devices. Core Features: Stateful WebSockets: Instead of short-lived HTTP requests, uses WebSockets for long-lived, bidirectional communication, while gracefully managing lifecycle events like offline drops, network restorations, and server outages. App Shell Caching: Using a Service Worker with a Network-First/Cache-Fallback strategy for offline app loading (App UI is shown to user even when offline). IndexedDB Message Queueing: Acting as a reliable, offline-capable write-ahead log and persist...

HTML Refresher and Detailed Study - Part 15

Last updated on 21 June 2026 Post series: Part 1 ,     Prev Part (14) ,     Post Series TOC Contents (sections and/or jump links) Stage-8: Render server delaying WebSocket close event till after ws.send is used Introduction Render Load Balancer may delay sending close event to node.js server container as it is viewed as low priority 4-second delay for Render server to send WebSocket close event is possible Localhost server behaves as expected but same server on Cloud could behave differently and in unexpected ways On Render server ws.send callback does not report WS error for disconnected WS; Immediately after ws.send, close event is sent Cannot use ws.ping to check if WebSocket is alive before calling ws.send on Render server 100 ms timer hack after ws.send to check if close event fires immediately after ws.send Capturing millisecond time intervals for WebSocket events on Render server; Only 1 ms interval between ws.send log and s...