News for hackers. Stuff that matters.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by freakynit on Saturday March 07, 2026 @10:28PM (#47294099)
What happens when a user lands directly on 2nd or 3rd level page and have not "jumped" from 1st level page?
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by vbernat on Saturday March 07, 2026 @11:15PM (#47294339)
The idea is that all the rendering is done server-side. So, the user always get a full page.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by freakynit on Saturday March 07, 2026 @11:49PM (#47294495)
Hmm, got it. Thanks..
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by hwhshs on Sunday March 08, 2026 @01:33AM (#47295099)
I feel like the browser should just do the same thing and this not be needed. E.g. seemless reload, keep scroll and focus state etc.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by amaury_bouchard on Sunday March 08, 2026 @07:38AM (#47296537)
Nothing special happens. µJS doesn't change anything for direct URL access. The server renders the full page as usual. µJS only intercepts navigation once it's initialized on the page. This is actually one of the advantages of this approach over a true SPA: every URL is a fully server-rendered page, so direct access, bookmarks, and sharing links all work out of the box.

Let's take an example. Say we have a website with 3 pages:

- Homepage "website.com/"

- Products "website.com/products"

- About "website.com/about"

Your browser can load any of these pages directly, as usual. But when you are on the homepage (for example) and you click on the "About" link, µJS load the "/about" URL, and replace the current page's `<body>` tag with the fetched page's one.

It's that simple.

Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by freakynit on Sunday March 08, 2026 @11:29PM (#47304578)
Got it.. thanks..