Visitar URL original
Searching for `max-age` to find information about `cache-control` doesn't work well · Issue #1577 · mdn/fred · GitHub
Skip to content

Searching for max-age to find information about cache-control doesn't work well #1577

Open

Description

@jsoref

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#response_directives

What specific section or headline is this issue about?

Response Directives max-age

What information was incorrect, unhelpful, or incomplete?

https://developer.mozilla.org/en-US/search?q=max-age doesn't yield anything particularly useful

And the quick search is even less useful:
Image

What did you expect to see?

Ideally searching for max-age should show something relating to https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#response_directives (max-age)

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching talks about max-age , but afaict it doesn't link to https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control

Activity

  1. added
    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.
    on May 12, 2026
  2. hamishwillee commented on May 18, 2026

    @hamishwillee

    The search engine will be picking the case that it does because max-age is in the header, and it will prioritize that kind of result. I wouldn't expect it to come up particularly based on "response header" since it is both a response and a request header directive in the "Cache-Control" and also appears in quite a lot of other headers.

    @caugner Is there something we should do about this? I scrolled through four pages with "max-age" in search bar and did not find it. In Google search syntax that would at least prioritise the string of max-age over all the things it picks up that happen to have "max" or "age" in them.

  3. transferred this issue frommdn/contenton May 18, 2026
  4. caugner commented on May 18, 2026

    @caugner
    Contributor

    Ideally the search for "max-age" should point the user to https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control#max-age, but by current design the search dialog uses a compact search index ordered by page popularity with only the page titles.

    The full text search is something we plan to improve in the next 12 months or so, and we might be able to address this case. It might be that Elasticsearch treats "max-age" as two words, rather than a keyword, and assigns the page a low relevancy for "max-age", because the page covers several different directives.

  5. removed
    needs triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.
    on May 18, 2026
  6. jsoref commented on May 21, 2026

    @jsoref
    Author

    In the interim, could the Guides/Caching page grow some extra links to pages that document the attributes it mentions? And if it did, would that help anything?

    (I appreciate and applaud the long term design improvements, but I'm wondering if there are some simpler things that could be done now to help hapless devs.)

  7. caugner commented on Jul 9, 2026

    @caugner
    Contributor

    In the interim, could the Guides/Caching page grow some extra links to pages that document the attributes it mentions? And if it did, would that help anything?

    This would be a question for @mdn/http.

  8. jsoref commented on Jul 9, 2026

    @jsoref
    Author

    I can't tell if that's a team reference (github certainly isn't telling me it's a team reference) or a directive for me to make a new ticket somewhere...

  9. hamishwillee commented on Jul 12, 2026

    @hamishwillee

    @jsoref It's a team reference: I am a member.

    could the Guides/Caching page grow some extra links to pages that document the attributes it mentions?

    My intuition is that this would make no difference to search on MDN. The quick search appears to prioritise search-term in the headings, so additional in-source links won't help there. The full search is not finding existing links to max-age, and adding more won't help.

    And if it did, would that help anything?

    Yes it would - just not search on MDN.

    The https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching doc is fairly core to info about caching but has no links to Cache-Control or any directives that are mentioned. The expectation is that we shoud link on first mention in text, and we might also reasonably mention at least Cache-Control in a ## See also section at the end.

    That will help users navigating to find more information. It might also help with Google search, and MDN search if it prioritizes link text tokens.

    PS Would you be able to do that PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions