Real-Time Navigation Prediction: Client-Side AI with the Speculation Rules API
summary
Shows a client-side pipeline that turns cursor movement, scroll speed and viewport dwell into live Speculation Rules JSON and injects it into Chrome to prerender or prefetch destinations. Uses ONNX Runtime Web on WebGPU, a 95 KB model with ~21,000 parameters running in a Web Worker (no server, no tracking). Demo updates confidence scores in real time; Raven reports ~43% LCP reduction and Tokopedia cites ~20× faster pages when applied correctly.
AI-written summary · about
chapters (28)
- 0:00Introduction by host
- 1:17Speaker introduction
- 2:01Web performance challenges
- 5:35Limitations of current optimizations
- 5:56Speculation Rules API overview
- 7:41Pre-rendering vs prefetching
- 9:48How to use speculation rules
- 11:13Use cases for speculation rules
- 12:38Client-side AI integration
- 13:20Browser support limitations
- 13:43Code implementation basics
- 14:47Document rules and targeting
- 15:28Eagerness settings explained
- 17:13Demo setup and tools
- 22:33Real-world implementation examples
- 24:22Avoiding over-speculation
- 26:29Animation and tracking issues
- 27:10Adobe Analytics case study
- 28:14Usage and adoption stats
- 29:39Integration with CDNs and tools
- 31:02The prediction problem
- 32:04Client-side AI as solution
- 32:46Browser capabilities for AI
- 33:52Building the ML model
- 36:02On-device AI demo
- 38:10Future of performance optimization
- 38:52Summary and conclusion
- 39:14Q&A session
