spaansba/ForesightJS
Lightweight JavaScript library that predicts user intent based on mouse movements and keyboard navigation. Perfect for smart prefetching. Also works for mobile! observed · 2026-08-28
Health v2 · maintenance only
81/100
- Activity 94
- Release rhythm 92
- Longevity 34
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 3
- age_days: 482
- days_rel: 56
- days_push: 37
- n_releases_24m: 26
Adoption not part of the score
1803 stars · 40 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
ForesightJS is a lightweight, framework-agnostic JavaScript library that predicts user intent from mouse trajectory, keyboard navigation, scroll, and touch cues to trigger prefetching before a user reaches a link or element. It ships official integrations for React, Vue, Angular, and Astro, plus devtools for visual debugging.
Use cases
- prefetch links before the user hovers them
- predict user intent from mouse movement
- prefetch on keyboard tab navigation
- smart prefetching for mobile touch devices
- reduce perceived page load times
- prefetch content when user scrolls toward an element
- respect data-saver and slow connections when prefetching
When to choose
- you want intent-based prefetching that works out of the box with zero configuration
- you need framework-agnostic prefetching with official React, Vue, Angular, or Astro adapters
- you want to support both desktop (mouse/keyboard) and mobile (touch/viewport) prediction strategies
- you need to avoid wasting bandwidth on slow connections or data-saver mode
When to avoid
- you only need simple hover or click prefetching without intent prediction
- your app is not browser-based (e.g., server-side or native-only)
- you cannot tolerate any client-side JavaScript overhead for tracking user input
Facets
library · maturity active
caching developer-tools middleware web-development frontend performance browser cross-platform prefetching intent-prediction mouse-trajectory keyboard-navigation smart-prefetch react vue angular astro typescript web-server
7 sources
- readme: https://github.com/spaansba/ForesightJS · fetched 2026-08-28 · 8dffe521fe43
- homepage: https://foresightjs.com/ · fetched 2026-08-29 · 842bbc84ea7f
- site_page: https://foresightjs.com/docs/getting-started/what-is-foresightjs · fetched 2026-08-29 · 27b2bf0176af
- site_page: https://foresightjs.com/docs/3.5/getting-started/what-is-foresightjs · fetched 2026-08-29 · 1c6729133bcc
- site_page: https://foresightjs.com/docs/debugging/devtools · fetched 2026-08-29 · c6fc0295ef3f
- site_page: https://foresightjs.com/docs/getting-started/quick-start · fetched 2026-08-29 · 99c41389dafd
- site_page: https://foresightjs.com/docs/configuration/global-settings · fetched 2026-08-29 · 2949c734fcd0
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| spaansba/ForesightJS | main | 81 |
For agents
markdown · JSON · MCP: product_card(name="spaansba/ForesightJS")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem