delta-cache-browser
Partially cache dynamic content and send only the changes over the wire.
When used with dynamic content, delta encoding can provide 62%-65% savings for HTML files.
There's no need to change any of your requests - simply include the following code and the service worker will automatically intercept requests and use delta caching if available.
Usage
// register the service worker if service workers are supportedif 'serviceWorker' in navigator // register the service worker (will activate with document reload) navigatorserviceWorker;
If service workers are not supported, it will fallback to normal browser control.
Designed to work with delta-cache-express, but it complies with any RFC 3229 compliant server. The encoding used for the deltas is googlediffjson
, JSON stringified patches returned from the google-diff-match-patch algorithm.