Hasty Treat - Updating / Restarting Long-Running Web Apps
Hasty Treat - Updating / Restarting Long-Running Web Apps

Hasty Treat - Updating / Restarting Long-Running Web Apps

HAYA

13 min
Kids
Play

Description

<p class="has-line-data" data-line-start="7" data-line-end="8">In this Hasty Treat, Scott and Wes talk about updating web apps that have running for a long time — the problems to look out for and how to avoid them.</p> <h2 class="code-line" data-line-start="9" data-line-end="10"><a id= "LogRocket__Sponsor_9" name="LogRocket__Sponsor_9"></a>LogRocket - Sponsor</h2> <p class="has-line-data" data-line-start="10" data-line-end="11"> LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at <a href= "https://logrocket.com/syntax">logrocket.com/syntax</a>.</p> <h2 class="code-line" data-line-start="12" data-line-end="13"> <a id="Show_Notes_12" name="Show_Notes_12"></a>Show Notes</h2> <p class="has-line-data" data-line-start="14" data-line-end="15"> 01:54 - The problem</p> <ul> <li class="has-line-data" data-line-start="15" data-line-end="17"> This only affects the client-side</li> </ul> <p class="has-line-data" data-line-start="17" data-line-end="18"> 05:28 - What are some solutions:</p> <ul> <li class="has-line-data" data-line-start="18" data-line-end="19"> Do nothing and hope the user refreshes.</li> <li class="has-line-data" data-line-start="19" data-line-end="22"> Have a list of assets, or commit hashes. Poll the server periodically, and when there is a new version available: <ul> <li class="has-line-data" data-line-start="20" data-line-end="21"> Prompt the user to refresh</li> <li class="has-line-data" data-line-start="21" data-line-end="22"> Just refresh the user (store current state in localstorage and restore)</li> </ul> </li> <li class="has-line-data" data-line-start="22" data-line-end="23"> Do a custom <Link> component, that checks the last time the user has refreshed (or if new version if available). When they click the link, render a regular <a> instead of a pushstate link.</li> <li class="has-line-data" data-line-start="23" data-line-end="24"> Use a service worker. The

Uploader

geraldine_star

geraldine_star

Hasty Treat - Updating / Restarting Long-Running Web Apps - Listen Free | WowFM