Skip to content

Commit

Permalink
Check for app updates every hour
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 22, 2024
1 parent fa92f4a commit 686a827
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Pkmds.Web/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<script src="_framework/blazor.webassembly.js" autostart="false"></script>
<script>
navigator.serviceWorker.register('service-worker.published.js', { updateViaCache: 'none' }).then(registration => {
setInterval(() => registration.update(), 1 * 60 * 60 * 1000); // check for updates every hour
registration.onupdatefound = () => {
const installingWorker = registration.installing;
installingWorker.onstatechange = () => {
Expand Down

0 comments on commit 686a827

Please sign in to comment.