Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions www/content/api.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
+++
title = "Javascript API"
description = """\
This documentation describes the JavaScript API for htmx, including methods and properties for configuring the \
behavior of htmx, working with CSS classes, AJAX requests, event handling, and DOM manipulation. The API provides \
helper functions primarily intended for extension development and event management."""
+++

While it is not a focus of the library, htmx does provide a small API of helper methods, intended mainly for [extension development](https://htmx.org/extensions) or for working with [events](@/events.md).
Expand Down
2 changes: 1 addition & 1 deletion www/content/essays/interviews/leonard_richardson.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "An interview with Leonard Richardson"
description = """\
In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses\
In this interview, Leonard Richardson, creator of the Richardson Maturity Model for RESTful web services discusses \
the history of REST, interoperability in APIs and his impression of newer approaches such as GraphQL."""
date = 2025-02-19
updated = 2025-02-19
Expand Down
2 changes: 2 additions & 0 deletions www/content/headers/hx-location.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
+++
title = "HX-Location Response Header"
description = """\
Use the HX-Location response header in htmx to trigger a client-side redirection without reloading the whole page."""
+++

This response header can be used to trigger a client side redirection without reloading the whole page. Instead of changing the page's location it will act like following a [`hx-boost` link](@/attributes/hx-boost.md), creating a new history entry, issuing an ajax request to the value of the header and pushing the path into history.
Expand Down
2 changes: 2 additions & 0 deletions www/content/headers/hx-push-url.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
+++
title = "HX-Push-Url Response Header"
description = """\
Use the HX-Push-Url response header in htmx to push a URL into the browser location history."""
+++

The `HX-Push-Url` header allows you to push a URL into the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API).
Expand Down
2 changes: 2 additions & 0 deletions www/content/headers/hx-push.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
+++
title = "HX-Push Response Header (Deprecated)"
description = """\
The HX-Push response header in htmx is deprecated. Use HX-Push-Url instead."""
+++

The `HX-Push` header has been replaced by [`HX-Push-Url`](@/headers/hx-push-url.md)
3 changes: 3 additions & 0 deletions www/content/headers/hx-redirect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
+++
title = "HX-Redirect Response Header"
description = """\
Use the HX-Redirect response header in htmx to trigger a client-side redirection that will perform a full page \
reload."""
+++

This response header can be used to trigger a client side redirection to a new url that will do a full reload of the whole page. It uses the browser to redirect to the new location which can be useful when redirecting to non htmx endpoints that may contain different HTML `head` content or scripts. See [`HX-Location`](@/headers/hx-location.md) if you want more control over the redirect or want to use ajax requests instead of full browser reloads.
Expand Down
3 changes: 3 additions & 0 deletions www/content/headers/hx-replace-url.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
+++
title = "HX-Replace-Url Response Header"
description = """\
Use the HX-Replace-Url response header in htmx to replace the current URL in the browser location history without \
creating a new history entry."""
+++

The `HX-Replace-Url` header allows you to replace the current URL in the browser [location history](https://developer.mozilla.org/en-US/docs/Web/API/History_API).
Expand Down
2 changes: 2 additions & 0 deletions www/content/headers/hx-trigger.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
+++
title = "HX-Trigger Response Headers"
description = """\
Use the HX-Trigger family of response headers in htmx to trigger client-side actions from an htmx response."""
+++

These response headers can be used to trigger client side actions on the target element within a response to htmx. You
Expand Down