Streaming Service Workers: Live Code Session – Supercharged

In this Supercharged Live Code Session, Jake & Surma implement a streaming Service Worker, coding in real time, bugs and all! Whether you are watching live …


#codango #developer #development #coder #coding

We're happy to share this resource that we found. The content displayed on this page is property of it's original author and/or their organization.


20 Replies to “Streaming Service Workers: Live Code Session – Supercharged”

  1. Chapters:
    0:09 – Intro & talking through the existing setup.
    9:30 – Creating & registering a service worker that logs to console.
    15:19 – Writing a fetch event with a very basic offline fallback.
    18:12 – Caching HTML, CSS and images, then modifying the fetch listener to create a branded offline page. Includes using static-module to dynamically write JavaScript.
    36:28 – Auto versioning caches.
    42:25 – Deleting caches from previous versions using the "activate" event.
    45:11 – Talking about app shell vs streaming when it comes to speeding up page loads.
    47:25 – Creating an endpoint that serves the middle of an article.
    50:15 – Creating & caching a generic page start & end.
    54:45 – Handling particular routes differently in the fetch event.
    1:01:08 – Combining three responses into a single streaming response.
    1:11:18 – Uh oh encoding issues.
    1:12:56 – Fixing the page title.
    1:14:25 – Showing the performance difference vs app shell.

  2. Amazing video.
    From what I understand you don't wait to generate the entire html to let the server respond, but you give to the client an array of stream promises. That is really cool. I wonder how do this way of coding competes with front end frameworks such polymer and its html imports ? … Which is basically doing the same thing, but with plain old HTTP GET… but maybe slighly delayed by the javascript execution of polymer library and the fact html imports are discovered one after the other when an element is loaded.

  3. 45:10 I don't think that using promises or async functions necessary defers work. Depending on the task and the underlying hardware they can get resolved in the same frame. I think the only reason they are useful, is that they don't block the event loop, as Jake said. But please correct me if I'm wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *