Views metatag "expires" doesn't accept zero (0)

Created on 30 August 2024, 3 months ago
Updated 6 September 2024, 3 months ago

Problem/Motivation

To mitigate browser caching of a Views page, I attempted to add recommended cache control headers:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">

The problem is that the Expires input doesn't accept the number zero. After saving the View, the input reverts to empty

Steps to reproduce

Enable the Metatag Views module
Add the above values to the Advanced Metatags list on a Views Page.
Save the View.
The Expires input will have reverted to empty, and no "expires" metatag will be present in the resultant page source

Proposed resolution

Presumably, this is because zero isn't matching the requirements for an otherwise compliant date string.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Views integration

Created by

πŸ‡ΊπŸ‡ΈUnited States msypes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024