I recommend hx-boost

hx-boost is an attribute provided by htmx that makes your website better with no downside. Really! As the page in the documentation describes, it makes <a> s that point within your website use AJAX. It swaps the body and pushes a history state, so it works exactly like an anchor normally does from the user's perspective. This might sound like overcomplicating things with JavaScript for a potential…