backdrop-issues icon indicating copy to clipboard operation
backdrop-issues copied to clipboard

[DX] .htaccess: Change the cryptic value of `A1209600` for `ExpiresDefault` to a human-readable one

Open klonos opened this issue 1 year ago • 4 comments

Current value is this:

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

Proposal to change that to this instead:

  # Cache all files for 2 weeks after access.
  ExpiresDefault "access plus 2 weeks"

See spec for details: https://httpd.apache.org/docs/current/mod/mod_expires.html

klonos avatar Jul 08 '24 00:07 klonos

With ExpiresDefault "access plus 2 weeks", it is not even necessary to comment that line.

avpaderno avatar Jul 10 '24 09:07 avpaderno

OK, here's a PR to get things going: https://github.com/backdrop/backdrop/pull/4827

I haven't completely removed the comment for now - lets wait for some feedback and adjust once others had a chance to chime in.

klonos avatar Jul 10 '24 12:07 klonos

I was going to suggest adding a link to a page explaining the syntax used for that directive, but then I noticed that is not done for the other directives as well.

avpaderno avatar Jul 10 '24 15:07 avpaderno

I like this improvement.

izmeez avatar Jul 15 '24 17:07 izmeez

Confirmed the code conforms to https://httpd.apache.org/docs/current/mod/mod_expires.html so I am marking as reviewed. Does this require a change record?

izmeez avatar Sep 22 '24 15:09 izmeez

Does this require a change record?

No, it does not. The files are still cached for two weeks.

(I think change records are for changes to the API, not changes to files.)

avpaderno avatar Sep 23 '24 05:09 avpaderno

Looks good to me too! We'll need to include a sentence in the release notes about changing .htaccess but as there is no functional change, no change record is needed.

quicksketch avatar Sep 26 '24 19:09 quicksketch

Merged https://github.com/backdrop/backdrop/pull/4827 into 1.x and 1.29.x. Thank you @klonos, @avpaderno, and @izmeez!

quicksketch avatar Oct 06 '24 03:10 quicksketch