Skip to content

Conversation

MichaelWest22
Copy link
Collaborator

@MichaelWest22 MichaelWest22 commented Apr 17, 2025

Description

This adds a new historyRestoreAsHxRequest config item to disable a breaking change made in #2013 where now we return HX-Request response header when requesting full page responses which causes many issues for users following our documentation that clearly states to use this response header for returning partial fragments. When returning partials based on this response header without knowing to also check and vary your cache on the HX-History-Restore-Request header your app will sometimes display the wrong result.

This config item is set to default to true to keep the breaking change in place for now so users relying on this behavior will not be impacted and users who need to return partial responses can disable this config as needed.

Corresponding issue:
#3037

Testing

Updated tests to test both states of the config value

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@Telroshan Telroshan added the enhancement New feature or request label Apr 20, 2025
@1cg 1cg merged commit 5520566 into bigskysoftware:dev Apr 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants