News for hackers. Stuff that matters.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by panny on Monday March 09, 2026 @07:35AM (#47307699)
I tried this out today and it doesn't seem to work for me, because it only considers relative urls to be "internal." If the urls are full urls (https://domain:port/...) then it won't work. It seems like it should be able to use window.location to work out that these full urls are also "internal" as well.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by amaury_bouchard on Monday March 09, 2026 @01:20PM (#47312081)
Thanks for the report! Using fully absolute URLs for internal links is not a very common pattern, and this hadn't been raised before. That said, it's a valid and interesting use case, I'll add it to the roadmap. In the meantime, using root-relative URLs (starting with /) is the recommended approach.
Re:Show HN: µJS, a 5KB alternative to Htmx and Turbo with ze... by amaury_bouchard on Wednesday March 11, 2026 @12:19PM (#47337588)
Thanks for the report! This is now fixed in v1.4.4.

µJS now resolves URLs using the native URL constructor and compares origin against window.location.origin. This means all same-origin URLs are correctly recognized as internal: - Absolute URLs: https://domain:port/page - Relative URLs: ../page.html, page.html - Local paths: /page (already worked)

Hash-only links (#section) are intentionally left to the browser for native anchor scrolling.