# Swap.js

> Swap.js is a lightweight JavaScript micro-framework that enables AJAX-style page updates by fetching and swapping HTML fragments from the server.

Page: https://nowfound.app/launch/swap-js-a-javascript-micro-framework-html-fragments-over-the

- Launched: 2023-05-18
- Launch-day votes: 127, 45 comments; #287 of 4,395 launches that month (top 7%)
- Website: [github.com](https://github.com/josephernest/Swap), online when checked 2026-09-16
- Category: [Dev tools](https://nowfound.app/c/developer-tools.md)
- Pricing: Free. Free and open source (checked 2026-11-21 on its site)
- Forecast: 95% chance its website is still online in November 2031 (99% in November 2027, 98% in November 2029). Made 2026-11-29 and not revised. Typical launch of 2023: 87%. [Method](https://nowfound.app/forecast.md)
- Originality: 38/100 (crowded field). More original than 38% of products launched in 2023. On its launch day the archive already held 28 similar products; 36 products like it have launched since.

## In plain words

Swap.js is a lightweight JavaScript micro-framework that enables AJAX-style page updates by fetching and swapping HTML fragments from the server. It targets developers seeking an alternative to heavy client-side frameworks like React, allowing them to build dynamic web applications using HTML, plain JavaScript, and any server-side language without requiring bundlers, compilers, or build tools. The framework uses the Fetch API and MutationObserver to detect and handle DOM changes automatically.

_Written by AI from its launch page and website, 2026-09-05._

## What it does, from its own words

Swap.js is a "HTML-over-the-wire" AJAX-navigation micro-library - josephernest/Swap.js

## Does a similar job

- [Nue](https://nowfound.app/launch/nue-apps-lighter-than-a-react-button): Nue is a framework for building lightweight applications and user interfaces. (2025-04-01, 756 votes, forecast: 96% online in 2031, nuejs.org)
- [µJS](https://nowfound.app/launch/js-a-5kb-alternative-to-htmx-and-turbo-with-zero-dependencie): µJS is a 5KB JavaScript library that enables AJAX-based navigation and form handling for web applications. (2026-03-07, 161 votes, free, forecast: 91% online in 2031, mujs.org)
- [Swapy](https://nowfound.app/launch/swapy): JavaScript tool to convert any layout to a drag-to-swap one (2024-07-19, 146 votes, forecast: 85% online in 2031, swapy.tahazsh.com)
- [Remix](https://nowfound.app/launch/remix-st363388): Next gen full stack web framework (2022-10-14, 413 votes, forecast: 90% online in 2031, remix.run)
- [One](https://nowfound.app/launch/one-a-new-react-framework-unifying-web-native-and-local-firs): One is a React framework designed to unify web and native app development. (2024-10-04, 506 votes, forecast: 92% online in 2031, onestack.dev)
- [FastDom](https://nowfound.app/launch/fastdom-lightweight-replacement-of-react-and-mobx): Full reactivity JS/TS framework. Lightweight replacement of React + MobX + React Router. Very small and fast !! (2019-03-24, 41 votes, free, forecast: 90% online in 2031, github.com)

All alternatives: https://nowfound.app/alternatives/swap-js-a-javascript-micro-framework-html-fragments-over-the.md

## For the maker of Swap.js

- Feature it at the top of the NowFound home page for $19 for 30 days, marked sponsored: https://nowfound.app/feature/swap-js-a-javascript-micro-framework-html-fragments-over-the
- Free: put the badge on the product's own site and it joins Featured products after the paid spots, and this page links to the site with a normal link search engines follow. HTML for the footer: `<a href="https://nowfound.app/launch/swap-js-a-javascript-micro-framework-html-fragments-over-the"><img src="https://nowfound.app/badge/swap-js-a-javascript-micro-framework-html-fragments-over-the.svg" alt="Swap.js on NowFound" height="32"></a>`

Source: [Show HN post](https://news.ycombinator.com/item?id=35991783)
