Badge​Size

This service creates badges based on the content length of any given file which is accessible, whether within your GitHub repository, npm package, CDN service or hosted your own endpoint.

The displayed size is based on the returned Content-Length returned by the files hosting siteof the file, by default this does not include the size of the returned headers but it will be the exact size that is your end-users will experience.

When requesting any compression type, if the hosting site doesn't support the requested compression then the size will (most likely) be the full uncompressed size (dependant on the file hosting service). There is also an internal maximum file-size for this case as most services do not return the Content-Length for compressed files.

To provide better scale while also reducing hosting costs, the files for a specific badge are fetched on-demand with any results internally cached to fulfil any subsequent requests. The caching mechanism uses a combination of cached number of elements in a FIFO style buffering where the minimum cache period is set to 24 hours, while also using any Cache-Control/Expires headers to provide longer periods when known. For example when using a CDN service that returns files from npm packages the internal Cache period and the resulting badge will be set to 1 year to reduce the number of requests made to the service.

Usage Details: To see how to format your URL and provide any optional parameters.

Examples: For a collection of simple example badges and how to include them within your repository readme files.

See Service Status

Please use this public GitHub repo for support to create Issues or requests.