DEV Community

Cover image for µJS: Fast AJAX Navigation for Server-Rendered Sites
jQueryScript
jQueryScript

Posted on

µJS: Fast AJAX Navigation for Server-Rendered Sites

µJS: a lightweight AJAX navigation library that intercepts link clicks and form submissions to load page content via fetch, cutting full browser reloads on server-rendered sites.

Highlights:
• ~5 KB gzipped — zero dependencies
• Patch mode: update multiple DOM fragments in one request
• SSE support for real-time page updates
• DOM morphing via idiomorph (preserves focus, scroll, video state)
• View Transitions API with silent fallback
• Prefetch on hover + built-in progress bar
• Works with PHP, Python, Go, Ruby — any backend that returns HTML

👉 Blog Post

👉 GitHub Repo

👉 Live Demo

Top comments (0)