Skip to main content

Provide a server-side means to ensure that clients always fetch assets when they are updated

Project description

Cachebust provides a server-side means to ensure that clients always fetch assets when they are updated on the server.

Many browsers have different means of caching, some will overcache, and using the HTTP cache headers, there’s always a chance you may need to update within the lifetime of the previous scripts.

cachebust provides a means to ensure that all assets are fetched by browsers when they are updated. The way it works, is that it takes HTML (via a library or commandline tool) and modifies the asset hrefs, adding a parameter “cachebust” equal to the md5sum of the file.

When the file changes, the md5sum will change, and the browser sees this as a distinct document, and will fetch the update no matter what its caching policy.

Usage

Usage: cacheBust (options) [input]

Options:

-r or --asset-root Specify the filesystem root which should be treated as “/” for links. Default is cwd

-e or --encoding Specify the encoding to use (default, utf-8)

-q or --quiet Do not print errors to stderr when cannot cachebust an element

--help Show this message

Library Documentation

Can be found at: http://htmlpreview.github.io/?https://github.com/kata198/cachebust/blob/master/doc/cachebust.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cachebust-1.0.2.tar.gz (16.7 kB view details)

Uploaded Source

File details

Details for the file cachebust-1.0.2.tar.gz.

File metadata

  • Download URL: cachebust-1.0.2.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cachebust-1.0.2.tar.gz
Algorithm Hash digest
SHA256 188733a27790f51115ae6a1ee3631f166d3aaa9604c237fdbe284d56d2e11c06
MD5 ea356e5e30a50b9020b54f6f7ff6d77f
BLAKE2b-256 7db1a08a4d959909c5a07ff70dbb3c4e29e6c341b039c775fb5b58d5ca2e1bf4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page