From 9c66af6c0024ba6dbfb78f629efdd5243455fba5 Mon Sep 17 00:00:00 2001 From: Rob Wagner Date: Sat, 22 Jul 2023 16:41:06 -0400 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d8c669..ab170a7 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ axum-htmx = { git = "https://github.com/robertwayne/axum-htmx", branch = "main" In this example, we'll look for the `HX-Boosted` header, which is set when applying the [hx-boost](https://htmx.org/attributes/hx-boost/) attribute to an element. In our case, we'll use it to determine what kind of response we send. -When is this useful? When using a templating engine, like [minijinja](https://github.com/mitsuhiko/minijinja), it is common to extend different templates from a `_base.html` template. However, HTMX works by sending partial responses, so extending our `_base.html` would result in lots of extra data being sent over the wire. +When is this useful? When using a templating engine, like [minijinja](https://github.com/mitsuhiko/minijinja), it is common to extend different templates from a `_base.html` template. However, htmx works by sending partial responses, so extending our `_base.html` would result in lots of extra data being sent over the wire. If we wanted to swap between pages, we would need to support both full template responses and partial responses _(as the page can be accessed directly or through a boosted anchor)_, so we look for the `HX-Boosted` header and extend from a `_partial.html` template instead.