Annotation Interface HxPushUrl


@Target({TYPE,METHOD}) @Retention(RUNTIME) public @interface HxPushUrl
Annotation to push a URL into the browser location history.

The possible values are:

  • HtmxValue.TRUE, which pushes the fetched URL into history.
  • HtmxValue.FALSE, which disables pushing the fetched URL if it would otherwise be pushed.
  • A URL to be pushed into the location bar. This may be relative or absolute, as per history.pushState().
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If the URL should be interpreted as context relative if it starts with a slash ("/").
    The value for the HX-Push-Url response header.
  • Element Details

    • value

      String value
      The value for the HX-Push-Url response header.
      Default:
      "true"
    • contextRelative

      boolean contextRelative
      If the URL should be interpreted as context relative if it starts with a slash ("/").
      Default:
      true