Service Worker implementation of Cache Digests for HTTP/2 (draft 01)
- WIP; the code is in early-beta stage
- only supports sending of fresh digests without etag
- install cache-digest.js into the root directory of the website
- add
<script src="/cache-digest.js"></script>
to your web pages - adjust the web server configuration to send:
service-worker-allowed: /
response headerlink: <push-URL>; rel="preload"
response header (see spec)
You can run cli.js to calculate cache digests manually.
% node cli.js -b https://example.com/style.css https://example.com/jquery.js https://example.com/shortcut.css
EeUM-QA
In the above example, -b
option is used so that the digest would be encoded using base64url. Please refer to -h
(help) option for more information.