Handling updates offline-first - HTTP 203

Поділитися
Вставка
  • Опубліковано 24 чер 2019
  • Jake and Surma chat about handling updates to offline-first apps. Can we do better than "Click here to update"? They look at examples from:
    squoosh.app/
    jakearchibald.github.io/svgomg/
    proxx.app/
  • Наука та технологія

КОМЕНТАРІ • 61

  •  5 років тому +29

    A reliable way to trigger Lie-Fi is to just start walking away from your home Wi-Fi. I usually get it down the street, 50-100 m away from my house.

  • @NanobyteOnline
    @NanobyteOnline 5 років тому +49

    loyal viewer here, yeah!

  • @Krilllind
    @Krilllind 5 років тому +33

    Best dev series on YT easily😍 Don't you dare stop making these

    • @BenjaminAster
      @BenjaminAster 2 роки тому

      Well I guess your dream hasn't come true because HTTP 203 is now dead...

    • @unicodefox
      @unicodefox Рік тому

      @@BenjaminAster is it though

  • @ImmaterialDigression
    @ImmaterialDigression 5 років тому +12

    Maybe the best way to sneakily update/reload is to hack into a webcam/camera to see if the user is looking away/not there and reload it when they aren't looking. Win-win situation. Constant surveillance is the best way to produce seamless UX.

  • @randfur
    @randfur 5 років тому +13

    7:23 Just keeping this timestamp handy for later.

    • @Anton-cv2ti
      @Anton-cv2ti 5 років тому

      Yes please

    • @boodeer732
      @boodeer732 Рік тому

      I can't believe I timestamped it as well instantly

  • @cyber_chris
    @cyber_chris 5 років тому +8

    Love to be a loyal viewer

  • @wmhilton-old
    @wmhilton-old 5 років тому +2

    HTTP 203: A FEW LOYAL VIEWERS
    I love your channel though! I hope it's as fun for you as it is informative and entertaining for us!

  • @blazinghellwheels
    @blazinghellwheels 2 роки тому +1

    You're pretty awesome
    You've also probably help me find a bug or two.
    Keep being awesome! ✌️

  • @emilemil1
    @emilemil1 5 років тому +2

    Another thing you could consider is to ignore the newer version if the changes are insignificant, and just prepare those for the next reload instead. For example in the case of a blog post it's common to update the post to fix typos, but maybe that's not worth reloading the page for.

  • @SergiuMunteanu
    @SergiuMunteanu 5 років тому +1

    Awesome content guys

  • @finsflexin
    @finsflexin 2 роки тому

    7:57, Omg i use that website all the time! That’s incredible.

  • @AndrewLoiacono
    @AndrewLoiacono 4 роки тому +2

    There are some good ideas here. I'll probably try something similar to the Proxx approach on my app.

  • @dbroche
    @dbroche 5 років тому

    Shoutout! 🙌🏼🙌🏼

  • @AndersonSilva-dg4mg
    @AndersonSilva-dg4mg 5 років тому +2

    Thanks, interesting

  • @mokkamokka4097
    @mokkamokka4097 5 років тому +1

    U're the beeest!

  • @Oswee
    @Oswee 5 років тому

    I think this still is a simple use-case. It's much more harder to do offline first for real-time collaborative ERP style apps. And i had this idea about tracking current user view and all the child components in that view to decide, should i update or not. But it seems pretty hard/complex thing to do. In context of real-time "websocketed" app.

  • @kingychiu
    @kingychiu 5 років тому +1

    It is really difficult to handle data model updates in real-time applications, especially many apps use no-SQL like firebase, there will always be outdated data model in the database... I wonder are there any good ways to handle this? Like the ORM in the relational database world. And if we do data model updates on demand (like on user visit), for a user with huge data size, it will take a while or it may freeze the app.

    • @farrellraafi1301
      @farrellraafi1301 5 років тому

      I implement my own ORM for that written in Rapydscript github.com/rafi16jan/rapyd-framework

  • @anticom1337
    @anticom1337 5 років тому +1

    Why can't you do HMR in a SPA?

  • @SaepulPasmu
    @SaepulPasmu 5 років тому

    Hllo my frieand.. handling ..

  • @victornpb
    @victornpb 5 років тому +1

    I'm really scared about making an offline first and then having a bug on the service worker and not being able to push an update because the updater is broken. Is there any easy way of remotely cache busting the SW?

    • @jakearchibald
      @jakearchibald 5 років тому +2

      It doesn't let you lock yourself in. Just deploy a fixed service worker to the same URL as the broken one. If, somehow, storage has been messed up in ways you can't predict and recover from, developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data can be used as a reset button.

    • @farrellraafi1301
      @farrellraafi1301 5 років тому

      I remember doing that on AppCache, scary shit

    • @pardal_bs
      @pardal_bs 4 роки тому

      That happened to me way too many times.

  • @locodev770
    @locodev770 5 років тому +1

    hey Guys, very instructive video, I have been working with cache just a few weeks ago, we have a pwa in reactjs and we want that users stays up to date as fast as possible, so, we end up doing network first for the html (with some timeout), and cache first for the js, css, etc. I don't test it with Lie-Fi, but I think that will work pretty well, what do you think?

    • @jakearchibald
      @jakearchibald 5 років тому +1

      It depends what the timeout is. That's what lie-fi users will get.

    • @Anton-cv2ti
      @Anton-cv2ti 5 років тому

      That approach could end up wrecking your app if you add new elements or change existing ones. The new altered html would be delivered, but the stale css or js might break since it wasn't designed with the new changes in mind.
      I think the best way to get around that would be to deliver inline css/js for very new changes, and then it could be removed a few weeks later when most people are on an updated cache. But that is very complex to do :/

  • @diegosisto
    @diegosisto 5 років тому +3

    I really want LieFi to be a thing

  • @IceMetalPunk
    @IceMetalPunk 5 років тому

    Service Workers are available on HTTPS only, right? That's unfortunate. Does anyone know of a Node.js web host that's free and offers free SSL? Because Heroku charges extra for it :(

    • @jakearchibald
      @jakearchibald 5 років тому +1

      glitch.com and netlify could be good choices here

    • @IceMetalPunk
      @IceMetalPunk 5 років тому

      @@jakearchibald Thank you for the suggestions! I'll look into them :)

  • @samirsaeedi74
    @samirsaeedi74 5 років тому

    10:56 the intro performs horribly on Firefox on Android though. Not sure why.

  • @RafaelCouto
    @RafaelCouto 5 років тому +1

    So you are not doing online first because of "lie-fi", so how does proxx.app solution work around this connection issue? I couldn't see any kind of improvements on the implementation that would make lie-fi better.

    • @jakearchibald
      @jakearchibald 5 років тому +4

      PROXX is offline-first, so it's totally fine during lie-fi. It won't be able to get an update if it's on lie-fi, but the user won't notice that, they'll just play the version they already have.

    • @jakearchibald
      @jakearchibald 5 років тому +1

      I dunno. People have been telling me for 10 years that the offline & low connectivity problem will go away. It hasn't yet.

  • @dearoren
    @dearoren 5 років тому

    Can you post the audio to podcast apps?

    • @jakearchibald
      @jakearchibald 5 років тому

      We have a seperate podcast fwiw developers.google.com/web/shows/http203/podcast/. The UA-cam series & podcast used to be kinda the same thing, but they're separate now so we can do more visual stuff here.

  • @tirumaleshwarkeregadde210
    @tirumaleshwarkeregadde210 5 років тому

    My service worker loading old index.html after new production department. How can I fix it? It's not every time though.
    I'm using reactjs.

    • @jakearchibald
      @jakearchibald 5 років тому +1

      Unregister the service worker developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/unregister

  • @hyperupcall
    @hyperupcall 5 років тому

    the color grading is too dark and green

  • @adamtolbert1296
    @adamtolbert1296 5 років тому

    What’s up with the Podcast??? Please say y’all haven’t cancelled it 😬😬

    • @jakearchibald
      @jakearchibald 5 років тому +1

      Sorry it's been so long. We've got one being edited right now. Will hopefully be out early next week.

    • @adamtolbert1296
      @adamtolbert1296 5 років тому

      Jake Archibald I’m assuming you meant “The Next Week” right??

  • @joebazooks
    @joebazooks 5 років тому

    would either of you want to donate that domain, web.dev, to me? it would be very much appreciated

  • @saulgarciaambriz4751
    @saulgarciaambriz4751 5 років тому

    Saul say hi

  • @jordmccord
    @jordmccord 5 років тому

    Shout out to meeeee

  • @MubashirAR
    @MubashirAR 5 років тому

    no views
    33 likes
    k youtube

  • @bartverkoeijen
    @bartverkoeijen Рік тому

    I still play PROXX every now and then when I'm on a plane. The app has aged well. 👍