This module allows you to control whether AJAX interactions on Views (like paging or filtering) update the browser's URL. This is useful for embedded or secondary Views on a page to prevent conflicts with back-button behavior. You can enable or disable this feature on a per-display basis within the Views UI.
About
Views AJAX History Toggle adds a per-display option to the Views UI that controls
whether AJAX interactions — paging, exposed filters, table sorting — update the
browser URL via history.replaceState().
Since Drupal 10.1, ViewAjaxController automatically appends a
SetBrowserUrl AJAX command to every AJAX-enabled View response,
keeping the address bar in sync with the current filter and pager state. This
is exactly right for full-page search or listing views. For embedded,
block, or secondary views — think a sidebar facet list, an off-canvas
tray, or a second view on the same page — the unconditional URL update breaks
back-button behaviour and can cause multiple views to overwrite each other's
URL changes. This module fills that gap.
Features
- Adds an AJAX history toggle to the Other section of every Views display.
- Defaults to Enabled — zero configuration required for existing views.
- Works per display, so a single view can have history enabled on its page display and disabled on its block display.
- Implemented as a Display Extender + event subscriber: no core overrides, no patches.
- Backward-compatible: displays without the option stored (created before the module was installed) behave as if the option is enabled.
- Automatically registers and deregisters the display extender on install/uninstall.
Requirements
- Views (included in Drupal core)
Getting started
Open any AJAX-enabled View in the UI, find AJAX history
under the display's Other section, and uncheck
Enable AJAX history for any display where you want URL updates
suppressed.