Also the IETF asks[2] that you please stop using "X-" to prepend your custom HTTP headers[3]
[1] https://unpoly.com/tutorial [2] https://tools.ietf.org/html/rfc6648 [3] https://htmx.org/reference/#headers
Also the IETF asks[2] that you please stop using "X-" to prepend your custom HTTP headers[3]
[1] https://unpoly.com/tutorial [2] https://tools.ietf.org/html/rfc6648 [3] https://htmx.org/reference/#headers
Their entire reason (Appendix B) is that "well, if the header eventually becomes a standard header, then there will be old apps that will only work with X-, and we'll have to keep the X- version around forever!" That seems like a very weak reason to me. Most custom headers are not going to become standard headers, and those that do, well, apps can update nowadays and we deprecate old web features all the time.
I see a lot of value in distinguishing non-standard headers as a matter of principle. Also, there's a little bit of classic charm to X-, it's almost a shibboleth of HTTP. Removing it feels as wrong to me as removing the :// from the URI protocol and saying "we really just need :/"
https://github.com/bigskysoftware/intercooler-js/graphs/cont...
https://github.com/unpoly/unpoly/graphs/contributors
I'm happy to change the headers htmx is young enough to get away with it. Would you like to issue a pull request?
As to a PR for the headers – I might just take you up on that!
It's clear that this is not what you intended, but I think from the response from the creator, that was the tone that you accidentally conveyed.
Just a thought for the future :-).
> SHOULD NOT prefix their parameter names with "X-" or similar constructs.
It doesn't spell out exactly what would be considered a "similar construct", but I think "HX-" might count as a similar construct.
There's no good way to implement the feature you want that would satisfy all reasonable interpretations of that RFC, so switching to "HX-" would be a half-measure.
I understood exactly what was meant by X-HX- and I think it's a good design.
Still, HX- is shorter and about as intuitive as X-HX- so I think it might still be the way to go, even though IMO that RFC isn't a good enough reason to change it.
So I think it's better for new projects to drop the "X-".
On the other hand, I think it's reasonable to prepend with "HX-" because these headers apply to functionality that is specifically related to the capabilities of this library (or similar libs). It is highly improbable that this syntax would ever become standardized in either the HTML or HTTP specs, but if it did, the HX in front of headers makes sense given that the tag attributes are also prepended with an HX.
From an entirely stylistic perspective, I also think that shoving an "X-" in front of all your headers is ugly (ugliness can of course be justified by usefulness, but as stated above I don't think that applies here).
But of course these are just my thoughts on the matter, others might like "X-", though I'll admit I don't know why you would.
But In my opinion it gets a lot of things right, specially around form submissions, validation, error handling, modals, history, navigation, passive updates, etc. It is like Turbolinks++.
But them using CoffeScript is the only reason for why I've not contributed to Unpoly even though I've found both bugs and stuff I'd like improved :/
thank you!