abundant-spring-38265
09/09/2022, 7:18 PMabundant-spring-38265
09/09/2022, 7:35 PMabundant-spring-38265
09/09/2022, 7:36 PMabundant-spring-38265
09/09/2022, 7:37 PMnumerous-garden-69863
09/09/2022, 8:27 PMmammoth-family-48524
09/09/2022, 9:59 PMrefined-waiter-90422
09/09/2022, 10:49 PMrefined-waiter-90422
09/09/2022, 10:50 PMancient-shoe-86801
09/09/2022, 10:59 PMancient-shoe-86801
09/09/2022, 11:01 PMancient-shoe-86801
09/09/2022, 11:02 PMancient-father-3063
09/10/2022, 8:15 AMancient-father-3063
09/10/2022, 8:16 AMancient-father-3063
09/10/2022, 8:16 AMripe-action-67367
09/10/2022, 9:45 AMripe-action-67367
09/10/2022, 9:45 AMminiature-lizard-24702
09/10/2022, 2:16 PMminiature-lizard-24702
09/10/2022, 2:16 PMmysterious-toddler-20573
09/10/2022, 2:28 PMminiature-lizard-24702
09/10/2022, 2:44 PMminiature-lizard-24702
09/10/2022, 2:44 PMwonderful-shampoo-13605
09/11/2022, 7:36 AMsse
messages to a html element, kind of how the afterbegin
etc swap methods work? I'd like to receive sse
events and append them to a list, rather than continuously replace the same elementbland-coat-6833
09/11/2022, 8:48 AMafterbegin
with SSE. Sounds like you want beforeend
to append to a listhappy-monitor-48276
09/11/2022, 11:42 AMhtmx:swapError
, in response i am targeting the element by id and using the same id in base tag as well.bland-coat-6833
09/11/2022, 11:45 AMhappy-monitor-48276
09/11/2022, 11:47 AMhappy-monitor-48276
09/11/2022, 11:54 AMancient-shoe-86801
09/11/2022, 5:41 PMHX-Request
header is present on the request the response is only a fragment of the HTML, otherwise the response is the full page. This allows pushing the URL of the fragment to the navigation bar, and be able to share that URL with somebody, navigation back/forward, etc. All the goodness of having a working route for the full page, but that we can also use for partial updates.
That let me to think that having two different responses defined only by the existence of a header disables two of the most basic HTTP cache mechanisms: the Last-Modified/If-Modified-Since and ETags.
The browser cannot tell between a request with HX-Request
and one without, so the response cannot be cached as the wrong one could be used (for example, the browser wants to load the full page but it has only the partial cached). Any thoughts about this?ancient-shoe-86801
09/11/2022, 5:46 PMhx-get
also to itself, but with a target of some div on the page. Then have a backend with that single page, either returning the full page or only the div, depending on the HX-Request header. Also, have that backend return a hard-coded last-modified on the response, and if it gets a If-Modified-Since return a 304.
Then:
1. Load the page for the first time.
2. Click the button to trigger a partial update. The response will include a last-modified.
3. Click button again. The request will include a If-Modified-Since, so the backend will return a 304, and the cached partial response will load.
4. Now click the link. Again, the request will include a If-Modified-Since, so the backend will return a 304, and the cached partial response will load. Sad faces because we wanted the full html this time.mysterious-toddler-20573
09/11/2022, 6:20 PM