Skip to content

h2o/cache-digest.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cache-digest.js

Build Status

Service Worker implementation of Cache Digests for HTTP/2 (draft 01)

Warning

  • WIP; the code is in early-beta stage
  • only supports sending of fresh digests without etag

How to Use

  1. install cache-digest.js into the root directory of the website
  2. add <script src="/cache-digest.js"></script> to your web pages
  3. adjust the web server configuration to send:
  • service-worker-allowed: / response header
  • link: <push-URL>; rel="preload" response header (see spec)

Calculating Digests at Command Line

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.

About

Service Worker implementation of Cache Digests for HTTP/2 (draft 01)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published