Show HN: µJS, a 5KB alternative to Htmx and Turbo with zero dependencies
10 hours ago
- #Web Development
- #SPA
- #AJAX
- µJS is a lightweight AJAX navigation library that makes websites feel like single-page apps without JavaScript.
- It intercepts link clicks and form submissions, fetches new pages in the background, and updates only changed content.
- No framework or build step is required; just add a script tag and call `mu.init()`.
- Works with any backend (PHP, Python, Ruby, Go, etc.) without server-side changes.
- Features include prefetch on hover, no full page reload, and a built-in progress bar.
- Supports GET, POST, PUT, PATCH, DELETE methods on links, buttons, and forms.
- Enables real-time updates via Server-Sent Events and supports View Transitions API.
- Single file (~5 KB gzipped) with zero dependencies.