sw-delta | An incremental cache for the web

 by   gmetais JavaScript Version: 0.1.0 License: GPL-2.0

kandi X-RAY | sw-delta Summary

kandi X-RAY | sw-delta Summary

sw-delta is a JavaScript library. sw-delta has no vulnerabilities, it has a Strong Copyleft License and it has medium support. However sw-delta has 2 bugs. You can install using 'npm i sw-delta' or download it from GitHub, npm.

Continuous delivery is great, but it comes at a price on performances. The more you deliver, the less browsers will use assets they had in cache, because of file versioning. Even if you only changed one letter in a file, it will get downloaded entirely.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              sw-delta has a medium active ecosystem.
              It has 1102 star(s) with 32 fork(s). There are 33 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 2 have been closed. On average issues are closed in 333 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of sw-delta is 0.1.0

            kandi-Quality Quality

              sw-delta has 2 bugs (0 blocker, 0 critical, 2 major, 0 minor) and 0 code smells.

            kandi-Security Security

              sw-delta has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              sw-delta code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              sw-delta is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              sw-delta releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              sw-delta saves you 6450 person hours of effort in developing the same functionality from scratch.
              It has 13413 lines of code, 0 functions and 11 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed sw-delta and discovered the below as its top functions. This is intended to give you an instant insight into sw-delta implemented functionality, and help decide if they suit your requirements.
            • Initialize the server .
            • Listen to the console
            • Each element is unique
            • collect unique unique values
            • determines if objects are unique
            Get all kandi verified functions for this library.

            sw-delta Key Features

            No Key Features are available at this moment for sw-delta.

            sw-delta Examples and Code Snippets

            No Code Snippets are available at this moment for sw-delta.

            Community Discussions

            No Community Discussions are available at this moment for sw-delta.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install sw-delta

            You need to install the project both client-side and server-side.

            Support

            No, I don't think so. This is just the beginning of the project. I'm looking for beta-testers. Chrome, Firefox and Opera. This is 59% of compatible browsers, according to Can I Use. It is designed as a progressive enhancement. Browsers that don't support Service Workers will redownload the full file as they've always done, while modern browsers will be able to ask for the delta only. The client-side should not be a problem. Your website needs to be served on HTTPS, this is a limitation built in the Service Worker API. Then you only need to load the service worker and it deals with everything. No other change is required on to the page. It's a bit more complicated. Your server needs to be able to handle delta requests and to compute them. For the moment, I only wrote a NodeJS library, called sw-delta-nodejs. But any other language should be able to run sw-delta. It could also become a module for Apache and Nginx. It's slow. Calculating the delta for a file such as angular.1.4.5-min.js (143KB) takes 500ms. This is why the delta files should not be re-generated for every user and should be cached server-side. The easiest is to use sw-delta behind a reverse proxy (or a CDN). This is pretty fast. The same angular.1.4.5-min.js file only takes 3ms to be regenerated from the delta. I've built a quick benchmark that measures the size of the delta files on a few famous libraries (testing for example jQuery being upgraded from v2.0.0 to v2.0.1). The average delta file is 14% of the normal file. But in fact, it all depends how often you deliver and how small are the changes you deliver. I'm using the diff-match-patch npm module, which is a NodeJS wrapper around google-diff-match-patch. Then I compress the output in a home-made format. I'm pretty sure some improvements can be achieved on the speed and weight, don't hesitate if you have some ideas and use the benchmark.js script to test them. Using Chrome's Network panel, you are able to see one request from the page to the Service Worker, and another request from the Service Worker to the server. Firefox is not as good as Chrome, it does not show the requests from the SW. ~~Because the Cache API does not allow the modification of a file before storing it into the cache.~~ It's actually possible and it will change soon (see issue #2). Yes, it is best to keep them all. But it won't stop working if some files get deleted so you can delete the oldest ones if you need some disk space. Currently, the only supported format is /some/path/name-version.ext. The version can be any string. I recommend changing the version only when the content is really modified, to avoid unnecessary requests. An md5 hash of the file makes a perfect version number.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i sw-delta

          • CLONE
          • HTTPS

            https://github.com/gmetais/sw-delta.git

          • CLI

            gh repo clone gmetais/sw-delta

          • sshUrl

            git@github.com:gmetais/sw-delta.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by gmetais

            grunt-devperf

            by gmetaisJavaScript

            unusedjs

            by gmetaisJavaScript

            UXFirst

            by gmetaisJavaScript

            sw-get-headers

            by gmetaisJavaScript

            grunt-yellowlabtools

            by gmetaisJavaScript