How can I configure Drupal to send out Last Modified/Etag headers

417 Views Asked by At

I am trying to get our Drupal 8.x website to send out ETag headers and/or Last-Modified headers for our pages, so that client browsers (and CloudFlare's intermediary cache) will cache the page. However, when I manually set the ETag headers, they seem to be removed by drupal. I have enabled Drupal's caching mechanism and upped max age to 1 day. Still I never get Drupal to send out these ETag and Last-Modified headers.

Anyone got a hint on where to look at? I cannot find proper documentation on this.

1

There are 1 best solutions below

1
user3037179 On

I know this is an old question, but I think it may still be relevant as I've come across this issue in both D7 and and D8. In my investigation and research, I have found these two links addressing this issue in the DO community. Hopefully, it may help someone else.

D8 - https://www.drupal.org/project/lastmodified_since D7 - https://www.drupal.org/project/drupal/issues/3055984