adamdbradley/foresight.js
DEPRECATED: Prior to recent developments with the picture element, Foresight.js gaves webpages the ability to tell if the user's device is capable of viewing high-resolution images before the image is requested from the server. Additionally, it judges if the user's device currently has a fast enough network connection for high-resolution images. Depending on device display and network connectivity, foresight.js will request the appropriate image for the webpage. observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
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: n/a
- age_days: 5286
- days_rel: n/a
- days_push: 4375
- n_releases_24m: 0
Adoption not part of the score
2228 stars · 89 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Foresight.js is a JavaScript library that detects whether a user's device has a high-resolution display and a fast enough network connection before requesting images, then loads the appropriate image variant. It is now deprecated in favor of the native HTML picture element and polyfills like picturefill.
Use cases
- serve retina images only to devices that support them
- avoid wasting bandwidth on slow network connections
- detect device pixel ratio before requesting images
- manage hi-res image variants across a site from one config
- estimate network connection speed in the browser
When to choose
- maintaining a legacy codebase that already uses foresight.js
- supporting very old browsers that lack the picture element and cannot use picturefill
When to avoid
- starting any new project - it is deprecated
- modern browsers that support the native picture element and srcset
- projects where picturefill or native responsive images suffice
Facets
library · maturity abandoned
image-processing http-client web-development frontend image-processing performance browser responsive-images retina deprecated network-detection device-pixel-ratio image-set javascript
1 source
- readme: https://github.com/adamdbradley/foresight.js · fetched 2026-08-28 · 565fd1c1b9e4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| adamdbradley/foresight.js | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="adamdbradley/foresight.js")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem