Skip to content

Add cache-control headers to the DAP code response #149

@sanason

Description

@sanason

The response from https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js contains no Cache-Control headers. Without such headers, the browser gets to make its own decisions about how to cache the content:

From MDN:

HTTP is designed to cache as much as possible, so even if no Cache-Control is given, responses will get stored and reused if certain conditions are met. This is called heuristic caching.
Heuristic caching is a workaround that came before Cache-Control support became widely adopted, and basically all responses should explicitly specify a Cache-Control header.

The DAP code is mutable content so it should probably have a no-cache header or possibly a short max-age.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions