start setting some max-age cache control headers on our website via htaccess [LUCENE-7986]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
just by the nature of using Apache httpd our website is pretty well behaved in terms of Last-Modified & ETag headers – but diff browsers use different hueristics for how long they will cache a page before they even bother to do a validation request, that can cause many people to see "stale" pages after we do release announcements.
Example: Chrome apparently uses this hueristic – w/o any upper bound – to decide how long to keep an item in it's cache w/o revalidation...
`(date_item_was_last_fetched - last_mod_date_when_item_was_last_fetched) / 10`
...that means that if it's been 100 days since they last time we updated & published a page, when someone loads our website in chrome, their browser will cache that page for up to 10 days w/o bothering to do a cacle-validation request to see if the page has changed.
We should consider taking advantage of `mod_headers` in our htaccess file to set `Cache-Control: max-age ...` headers on various file extensions, and perhaps set lower max-ages (or must-revalidate options) on some of the pages we use specifically for annoucements & releases (ie: news, download, doc landing pages, etc...)
---
Migrated from [LUCENE-7986](https://issues.apache.org/jira/browse/LUCENE-7986) by Chris M. Hostetter (@hossman)
Contributor guide
Research direction
Start by locating the website's htaccess file and reviewing how Apache mod_headers is currently configured. Identify the file extensions and announcement or release pages that need bounded caching, then confirm the intended max-age and revalidation behavior before testing the resulting response headers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100