htmx 0.4.0 has been released!

htmx 0.4.0 Release I’m pleased to announce the 0.4 release (https://unpkg.com/browse/htmx.org@0.4.0/) of htmx. Changes New Features • Now support the HX-Redirect and HX-Refresh response headers

htmx 0.4.0 Release I’m pleased to announce the 0.4 release (https://unpkg.com/browse/htmx.org@0.4.0/) of htmx.

Changes New Features

• Now support the HX-Redirect and HX-Refresh response headers for redirecting client side and triggering a page refresh, respectively

• hx-vars now overrides input values

tags in responses will be used to update page titles</p> <p>• All uses of eval() have been removed in favor of Function</p> <p>• hx-vals is available as a save alternative to hx-vars. It uses JSON.parse() rather than evaluation, if you wish to safely pass user-provided values through to htmx.</p> <p>Bug Fixes</p> <p>• Eliminated perf issues around hx-boost in large pages that are not using that attribute</p> <p>• Fixed bug which prevented evaluation when a script tag was the leading content in a response</p> <p>Enjoy!</p> </div> <section class="article-references-section p-0"> <ul class="reference-list list-unstyled"> <li> Reference: <a href="https://htmx.org/posts/2020-11-16-htmx-0-4-0-is-released/" target="_blank" rel="noopener noreferrer">https://htmx.org/posts/2020-11-16-htmx-0-4-0-is-released/</a> </li> </ul> </section> </div> <details class="comment-form-toggle"> <summary class="btn btn-primary comment-form-toggle__cta">Write a comment</summary> <form data-controller="nostr--nostr-comment" data-nostr--nostr-comment-publish-url-value="/comments/publish" data-nostr--nostr-comment-csrf-token-value="abb48ac5.55akaGO464cr0C0fE-zbroW-JDyL_B8KfYhNdYS4lOo.3-TvMVT00vJ4mkVdcbi99-zcZWzyo049POcrQczP0ZKC4MAyCee4yH_oHQ" data-nostr--nostr-comment-root="{"tag":"A","value":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","relay":null,"pubkey":"247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90","kind":30023}" data-nostr--nostr-comment-parent="{"tag":"a","value":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","relay":null,"pubkey":"247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90","kind":30023}" data-action="submit->nostr--nostr-comment#publish" class="nip22-comment-form"> <div data-nostr--nostr-comment-target="status"></div> <div class="mb-2"> <label for="comment_content_nip22_comment_69fc6ff8dd37e" class="form-label hidden">Comment</label> <textarea id="comment_content_nip22_comment_69fc6ff8dd37e" name="comment[content]" class="form-control" rows="3" required placeholder="Write your comment"></textarea> </div> <input type="hidden" name="comment[root]" value='{"tag":"A","value":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","relay":null,"pubkey":"247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90","kind":30023}'> <input type="hidden" name="comment[parent]" value='{"tag":"a","value":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","relay":null,"pubkey":"247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90","kind":30023}'> <div class="actions"> <button type="submit" data-nostr--nostr-comment-target="publishButton" class="btn btn-primary mt-2">Publish Comment</button> </div> </form> </details> <div data-content--comments-mercure-target="loading" data-controller="content--comments-mercure live" data-content--comments-mercure-coordinate-value="30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released" data-live-name-value="Organisms:Comments" data-live-url-value="/_components/Organisms:Comments" id="live-1726886854-0" data-live-props-value="{"payloadJson":" ","current":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","authorPubkey":null,"rootContext":{"tag":"A","value":"30023:247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90:htmx-040-has-been-released","relay":null,"pubkey":"247fb701c5654ff95867d56889c7734539c7195f6c9bc117374a8a649afaea90","kind":30023},"replyPublishUrl":"\/comments\/publish","replyCsrfToken":"8b3b155dacc38ddca20db8759f7af._MoxXaSQkckhBeCvx7BVVjGvxg59aOtXnmHlypulKzs.xLh6BJPcqLxyT4jtpeQzD1jNh14EN7pg3w6D_tPSbkOZvFUHzs_ChnU90A","list":[],"@attributes":{"id":"live-1726886854-0"},"@checksum":"V3hfb7uhYcLxzAqfZc8NVuASYhnsDidfiIUIK5nkoC4="}" class="comments" > <div class="comments-list" data-content--comments-mercure-target="list" > <div class="no-comments">No comments yet.</div> </div> </div> </article> </main> <div> <aside id="rightNav"> <header> <button class="close" data-action="click->sidebar-toggle#close" aria-label="Close right sidebar">✕</button> </header> <div class="d-flex gap-3 center mt-3 mb-3"> <a class="btn" href="/blog/start">Start a Magazine</a> </div> </aside> </div> <div data-controller="ui--back-to-top"> <button class="back-to-top-btn" data-ui--back-to-top-target="button" data-action="click->ui--back-to-top#scrollToTop" aria-label="Back to top" title="Back to top"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="18 15 12 9 6 15"></polyline> </svg> </button> </div> </div> <div data-controller="utility--install-prompt"> <div class="install-prompt-box hidden" data-utility--install-prompt-target="promptBox" > <p>Install this app on your device for quick access?</p> <button data-action="click->utility--install-prompt#install">Yes, install</button> <button data-action="click->utility--install-prompt#dismiss">No thanks</button> </div> </div> <div data-controller="utility--toast" class="toast-container" data-utility--toast-target="container"> </div> <footer> <div class="footer-grid"> <div class="footer-col"> <div class="footer-section"> <ul class="footer-list"> <li><a href="/about">About</a></li> <li><a href="/pricing">Pricing</a></li> <li><a href="/subscription/vanity">Vanity Name</a></li> <li><a href="/subscription/active-indexing">Active Indexing</a></li> <li><a href="/subscription/publication-subdomain">Publication Subdomain</a></li> <li><a href="/tos">Terms of Service</a></li> <li><a href="https://support.decentnewsroom.com" target="_blank" rel="noopener">Support</a></li> <li><a href="/feedback">Contact</a></li> </ul> </div> </div> <div class="footer-col"> <div class="footer-section"> <ul class="footer-list"> <li><a href="/changelog">Changelog</a></li> <li><a href="/roadmap">Roadmap</a></li> <li class="footer-nostr-link"> <img class="footer-icon" src="/assets/icons/nostr-icon-purple-transparent-256x256-k-bX6RP.png" width="16" height="16" alt="Nostr"> <a href="/p/npub1ez09adke4vy8udk3y2skwst8q5chjgqzym9lpq4u58zf96zcl7kqyry2lz" data-turbo-frame="_top"><span> Decent Newsroom </span> </a> </li> <li> <a href="https://github.com/decentnewsroom/newsroom" target="_blank" rel="noopener"> <svg class="footer-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg> GitHub </a> </li> </ul> </div> </div> </div> <div class="footer-bottom"> <p>© 2026 Decent Newsroom · v0.0.36 Preprint</p> </div> </footer> </body> </html>