4 ms·
Using an HTTP header to decide between "just return a snippet for this specific list element" v. "return the whole page with the updated content for this list e
by yellowapple 4y ago
Using an HTTP header to decide between "just return a snippet for this specific list element" v. "return the whole page with the updated content for this list element" is an interesting choice that I hadn't really considered before; normally I would've opted for two entirely separate routes (one for the full page, one for the specific hypermedia snippet), which HTMX also seems to support. I guess it ain't fundamentally different from using e.g. Accept-* headers for content negotiation.
- quii 4y agoI think both are valid, as i mentioned in the article, for this particular case, the psuedo content-negotiation felt right