Swap.js
github.com · Open source · Quiet
Tiny HTML-over-the-wire library for AJAX-style fragment swapping
- Developer tools
- Open source
- PHP
- Day-7 check
- Day-30 check
- htmx
- ajax
- javascript
- dom
- fetch api
- html
- single page applications
- xmlhttprequest
- vanilla js
- html over the wire
- Stars
- 313
- Forks
- 7
- Open issues
- 3
- Last commit
- Found
- 3 years ago
GitHub figures as of . They are context, not a ranking.
Swap.js is a small JavaScript library for AJAX-style navigation that replaces page fragments with HTML from the server. It needs no bundler or build step, and the maker positions it against HTMX and Unpoly, and it suits developers who want simple server-rendered updates without a client-side framework.
Positioned as an alternative to HTMX, Unpoly.
Repository description on GitHub: “Swap.js is a "HTML-over-the-wire" AJAX-navigation micro-library”
What it does
- Replaces page fragments with HTML sent from the server
- Handles browser history and the back button
- Vanilla JavaScript with no bundler or build step
Good for
- Update parts of a server-rendered page without a full reload
- Add AJAX-style navigation to a PHP or Python app
Suits: Developers who want server-rendered updates without a client framework.
What you can try
Read the README on GitHub and install from source.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw Swap.js on , when josephernest posted it to Show HN. GitHub listed no published releases for josephernest/Swap when checked , so the project may ship straight from its main branch. The repository was created .
Day-7 and day-30 updates
Day 7 no new release
- No tagged release was published in the first 7 days after it was found (GitHub release dates).
- Show HN discussion at check time: 127 points, 45 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 no new release
- No tagged release was published in the first 30 days after it was found (GitHub release dates).
- Show HN discussion at check time: 127 points, 45 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: josephernest/Swap
- Found: josephernest posted it to Show HN. Show HN
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Quick answers
- When was Swap.js released?
- No dated release record is available. Kip found it on Show HN on 18 May 2023.
- Is Swap.js open source?
- Its source is public on GitHub at josephernest/Swap under the MIT licence.
- What does Swap.js run on?
- Library.
- Is Swap.js free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is Swap.js still maintained?
- It has had no commit or release for over a year as of the latest check.
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | josephernest/Swap REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-35991783. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.