Skip to content

The Cache-Control HTTP header is not enough to prevent GitHub’s CDN caching #221

@0xced

Description

@0xced

The img.shields.io server sends Cache-Control: no-cache, no-store, must-revalidate HTTP header in order to prevent caching by GitHub’s CDN.

Unfortunately, that’s not enough. According to @bkeepers in github/markup issue #224

We're pretty confident that the image caching works. If you're having issues with something like a CI badge, make sure the image has the Cache-Control: no-cache header, and either Expires, Last-Modified or Etag. See the Fastly documentation for more info.

If you're still having issues, contact support@github.com

Since img.shields.io doesn’t send any of Expires, Last-Modified or Etag GitHub still caches the badges too much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions