This project is not covered by Drupal’s security advisory policy.

Browser No Cache Routes provides an easy way to disable browser caching for specific Drupal routes. This module ensures that selected pages always load fresh, preventing issues caused by browser back/forward cache or outdated content. Ideal for login pages, dashboards, forms, or any route where real-time data matters.

Features

  • Configure any Drupal route to send no-cache, no-store, and related headers.
  • Prevents browser back/forward cache (bfcache) from showing stale pages.
  • Admin UI with a clean table format to manage routes.
  • Adds cache-control headers only to the routes you choose — no global changes.
  • Useful for:
    • Login or authentication pages
    • User dashboards with real-time data
    • Dynamic forms
    • Sensitive content that must not be cached
    • Custom application interfaces inside Drupal

This module solves a common problem: JavaScript or dynamic content does not execute when using the Back button because browsers serve a cached page. By disabling caching for those routes, everything reloads correctly.

Post-Installation

After installing the module:

  1. Navigate to Configuration → Development → Browser No Cache Routes.
  2. Add the route names you want to exclude from browser caching.
  3. Save the configuration.

Once configured, the module automatically sends appropriate Cache-Control, Pragma, and Expires headers. No coding or theme changes required.

Additional Requirements

This module has no external dependencies. It works with standard Drupal core installations and requires no external libraries or APIs.

  • Devel – helps identify route names.
  • Webprofiler – useful for inspecting requests and headers.

What makes this module unique?

It provides fine-grained, route-level control specifically focused on browser caching behavior, rather than Drupal’s internal cache system.

Supporting organizations: 

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Created by sundhar on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases