htmx icon indicating copy to clipboard operation
htmx copied to clipboard

History Restore Request only Loads <body> not entire document

Open seanaye opened this issue 1 year ago • 1 comments

I think this issue is related to #2446

Follow the exact same steps as in that issue, but instead of returning a 303 instead return this html

<html>
<head>
    <meta http-equiv="refresh" content="0;URL='{{ url }}'"/>
</head>
  <body><p>Moved to <a href="{{ url }}">{{ url }}</a>.</p></body>
</html>

Htmx receives this content from the server but only replaces the document body, the html head is not updated. Even if the hx-retarget and hx-reswap headers are added the behaviour is the same

Will provide reproduction on request

seanaye avatar Mar 30 '24 13:03 seanaye

You may need https://htmx.org/extensions/head-support/

andryyy avatar Mar 30 '24 17:03 andryyy