Skip to content
Search

ForesightJS

lastmod 2025-07-30created 2025-07-301 edits

A performance-optimizing prefetching JS library based on mouse and keyboard prediction

About

  • An ultra-lightweight JavaScript library that predicts user intent in real time
  • Analyzes user behavior such as mouse trajectory, scroll direction, and tab/keyboard navigation in real time, and runs actions on the expected target before a hover happens
  • Optimizes prefetch timing: the developer decides what (what) to load and when (how), while ForesightJS decides when (when) to prefetch
  • Unlike the limitations of hover and viewport prefetching (delays, unnecessary data loading, accessibility left out), it automates preloading resources only for UI elements that are actually likely to be clicked or focused, maximizing performance and perceived speed
  • The DevTools package visualizes predictions in real time, including trajectories, areas, and callback execution
  • Full TypeScript support and framework-agnostic (Next.js/React Router, etc.), so anyone can use it

See also

Favorite site

author Zer0 sitemap