pwa-update-available | Service Workers - New Update Available sample

 by   deanhume HTML Version: Current License: No License

kandi X-RAY | pwa-update-available Summary

kandi X-RAY | pwa-update-available Summary

pwa-update-available is a HTML library. pwa-update-available has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Have you ever been on a website and noticed a popup notification that suggests that there is a new version of the site available? I recently visited Google’s Inbox and noticed a notification a little like the image below. If you'd like to learn how to create this for your site and for a step by step guide, please visit my blog at deanhume.com. This repo contains a basic example that will show you how to add a notification to your site and display it each time that there is a new version of the service worker available. You’ll also learn how to refresh the page, so that the user is up to date and has the latest version of any cached files.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              pwa-update-available has a low active ecosystem.
              It has 219 star(s) with 23 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 4 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of pwa-update-available is current.

            kandi-Quality Quality

              pwa-update-available has no bugs reported.

            kandi-Security Security

              pwa-update-available has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              pwa-update-available does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              pwa-update-available releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pwa-update-available
            Get all kandi verified functions for this library.

            pwa-update-available Key Features

            No Key Features are available at this moment for pwa-update-available.

            pwa-update-available Examples and Code Snippets

            No Code Snippets are available at this moment for pwa-update-available.

            Community Discussions

            Trending Discussions on pwa-update-available

            QUESTION

            Service worker update event trigger
            Asked 2019-Nov-03 at 23:30

            Following this link https://github.com/deanhume/pwa-update-available, I am trying to implement the service worker update, but I am facing issues like the event update is not getting triggered, which I think is related to my app design, which basically a SPA, means I am always on index.html,which behaves like app-shell and I am pushing the contents in the contents area, depending upon which button is clicked.

            only other page is login/index.html

            the contents for app.js to install/update service worker is like this:

            ...

            ANSWER

            Answered 2019-Nov-03 at 23:30

            the service worker registration routine you have only triggers when you index.html is loaded in the browser. It is the only time that code is executed.

            Unless you periodically poll your server or possibly open a websocket (sort of expensive just for this) you wont know if a new service worker is available. You could have the user register for push notifications....too much headache for this.

            So pool the server every few hours or days for an update.

            If there is an update you can trigger an update routine.

            I would put the polling logic in the actual service worker code to keep it off the UI, if you are a SPA you are already locking the UI thread enough LOL.

            There are lots of ways to skin this cat, setTimeout(..., {lots of seconds}), when the service worker wakes from being dormant, etc.

            If you can make a HEAD request that would keep the network traffic to a minimum.

            If there is an update you could then post a message to the UI to update the service worker.

            This is not what I would call trivial code. I do similar stuff to keep my cached assets up to date, so I have been there :)

            Source https://stackoverflow.com/questions/58649020

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

            Vulnerabilities

            No vulnerabilities reported

            Install pwa-update-available

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/deanhume/pwa-update-available.git

          • CLI

            gh repo clone deanhume/pwa-update-available

          • sshUrl

            git@github.com:deanhume/pwa-update-available.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