3 ms·
You can get JS-free, client-side include functionality if you're willing to wrap your HTML in XML. Here is a demo: https://github.com/Evidlo/xsl-website https
by Evidlo 1y ago
You can get JS-free, client-side include functionality if you're willing to wrap your HTML in XML. Here is a demo:
https://github.com/Evidlo/xsl-website https://github.com/Evidlo/xsl-website
- imiric 1y agoThat's interesting, thanks. How well supported is XSLT in modern browsers? What would be the drawbacks of using this approach for a modern website?
- Evidlo 1y agoIts fully supported in every current browser. Some things that suck are that XML is stricter than HTML and every XML needs to include the templates file at the first line
- int_19h 1y agoI don't think you even need to wrap it, really. You need to make sure it's valid XML, but the root element could be <html> just fine. And then use an identity transform with <xsl:output method="html">.