Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
amaury_bouchard
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Show HN: Content Negotiation in PHP – API Without API (Symfony, Laravel, Temma)
(old.reddit.com)
3 points
by
amaury_bouchard
6mo ago
|
0 comments
2.
▲
by
amaury_bouchard
6mo ago
Both points are now addressed: relative paths are handled, and the documentation includes the integrity hash. Thanks for taking the time to suggest these improvements!
3.
▲
by
amaury_bouchard
6mo ago
Thanks!
4.
▲
by
amaury_bouchard
6mo ago
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
5.
▲
by
amaury_bouchard
6mo ago
Good news, I've just added the server-side source as a tab in the Playground. Thanks again for the suggestion!
6.
▲
by
amaury_bouchard
6mo ago
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 meanti
7.
▲
by
amaury_bouchard
6mo ago
Yes, µJS manages browser history out of the box.
8.
▲
by
amaury_bouchard
6mo ago
Fair enough, it's clearly not the right tool for everyone. HTML-over-the-wire works well for server-rendered apps where the primary interaction is fetching and displaying content. For highly interactive UIs with complex client-side sta
9.
▲
by
amaury_bouchard
6mo ago
Thank you for the information. There was a DNS misconfiguration, but it should be fixed now (allow some time for DNS propagation).
10.
▲
by
amaury_bouchard
6mo ago
That's a valid use case. For opt-in per link, you can disable global link interception with `mu.init({ processLinks: false })` and then add `mu-url` explicitly to the links you want µJS to handle. For the variable base path scenario, t
11.
▲
Show HN: µCSS, a CSS framework with 17 components, 20 themes, no build required
(mucss.org)
3 points
by
amaury_bouchard
6mo ago
|
4 comments
12.
▲
by
amaury_bouchard
6mo ago
Glad it clicks! On the progressive enhancement point, µJS is designed exactly with that philosophy in mind: standard links and forms work without JS, µJS just enhances them. Your concern about `mu-method="delete"` is valid. Withou
13.
▲
by
amaury_bouchard
6mo ago
Good points, thanks! On relative paths: the current behavior is intentional for simplicity. µJS checks whether the URL starts with a slash (but not a double slash) to identify internal links. No one has reported this as an issue so far, but
14.
▲
by
amaury_bouchard
7mo ago
Thanks! The short answer: µJS doesn't try to be a DSL in HTML attributes. Here's what I deliberately left out compared to Turbo (~25KB gzip) and htmx (~16KB gzip): - No client-side template/extension system. htmx has a full e
15.
▲
by
amaury_bouchard
7mo ago
Fair point on shadow DOM. That said, µJS targets server-rendered HTML workflows, where pages are plain HTML generated by a backend framework or template engine. In that context, shadow DOM is rarely used, so this limitation doesn't aff
16.
▲
by
amaury_bouchard
7mo ago
No worries! You can prevent the page from scrolling to the top by adding `mu-scroll="false"` to the link or form triggering the request. You can also disable it globally with `mu.init({ scroll: false })`. In the Playground, the sc
17.
▲
by
amaury_bouchard
7mo ago
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 thi
18.
▲
by
amaury_bouchard
7mo ago
Thanks, looking forward to your feedback! I deliberately chose the phonetic spelling 'mu' of the 'µ' greek letter, rather than the typographic approximation 'u'. The 'u' convention comes from ASCII li
19.
▲
by
amaury_bouchard
7mo ago
The sweet spot is everything between a static website and a full SPA, which is actually most of the web. Think e-commerce (filtering, cart updates, pagination), dashboards (refreshing metrics, notifications), admin interfaces (inline editin
20.
▲
by
amaury_bouchard
7mo ago
Thanks for the link. I'm aware of the debate around GitHub. For now it's where µJS lives, but noted.
21.
▲
by
amaury_bouchard
7mo ago
Good point, thanks! That would definitely make the examples clearer. I'll keep it in mind.
22.
▲
by
amaury_bouchard
7mo ago
The target audience is developers who are efficient at generating HTML server-side using an MVC framework, a template engine, whatever they're comfortable with. Instead of building a JSON API and a JavaScript layer to consume it, you j
23.
▲
by
amaury_bouchard
7mo ago
Yes, htmz is a great project! The core idea is similar, but htmz is intentionally more minimal (it's literally 166 bytes). µJS covers more ground: patch mode, SSE, DOM morphing, View Transitions, prefetch, polling, full HTTP verb suppo
24.
▲
by
amaury_bouchard
7mo ago
That's exactly what patch mode is designed for. You open a single SSE connection on a parent element with `mu-mode="patch"` and `mu-method="sse"`, and the server sends HTML fragments with `mu-patch-target` attribute
25.
▲
by
amaury_bouchard
7mo ago
Nice! 100 lines is impressive. µJS is a bit more feature-rich (patch mode, SSE, DOM morphing, View Transitions...) but if you need something truly minimal, Swap.js looks like a great option.
26.
▲
by
amaury_bouchard
7mo ago
Yes! `<script>` and `<style>` tags found in the fetched content are processed on the fly, as long as they haven't been loaded already. So you can include a gallery-specific stylesheet or script directly in the partial, and
27.
▲
by
amaury_bouchard
7mo ago
Thanks! Yes, swapping the entire body by default felt like the right trade-off, it covers 90% of use cases with zero configuration, and you can always narrow it down to a specific fragment (or group of fragments) when needed.
28.
▲
by
amaury_bouchard
7mo ago
Indeed! While the names are similar, µJS (mujs.org) and MuJS (mujs.com) are completely different projects. The former is a browser navigation library (a lightweight alternative to HTMX and Turbo), while the latter is an embeddable JavaScrip
29.
▲
by
amaury_bouchard
7mo ago
µJS is HTML-over-the-wire, so it doesn't parse JSON responses natively (same limitation as HTMX). That said, you can work around it using the `mu:before-render` event, which lets you intercept the raw response before it hits the DOM an
30.
▲
by
amaury_bouchard
7mo ago
Thanks for the feedback! The RDFa `resource` attribute is an interesting angle I hadn't considered. That said, µJS's default behavior actually requires zero `mu-` attributes; it intercepts standard `href` links and `action` forms
More ›