Handling updates offline-first - HTTP 203

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 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.

  • @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.

  • @NanobyteOnline
    @NanobyteOnline 5 лет назад +49

    loyal viewer here, yeah!

  • @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!

  • @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.

  • @blazinghellwheels
    @blazinghellwheels 3 года назад +1

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

  • @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

  • @AndrewLoiacono
    @AndrewLoiacono 5 лет назад +2

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

  • @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.

  • @finsflexin
    @finsflexin 2 года назад

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

  • @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

  • @SergiuMunteanu
    @SergiuMunteanu 5 лет назад +1

    Awesome content guys

  • @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 :/

  • @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.

  • @anticom1337
    @anticom1337 5 лет назад +1

    Why can't you do HMR in a SPA?

  • @mokkamokka4097
    @mokkamokka4097 5 лет назад +1

    U're the beeest!

  • @SaepulPasmu
    @SaepulPasmu 5 лет назад

    Hllo my frieand.. handling ..

  • @diegosisto
    @diegosisto 5 лет назад +3

    I really want LieFi to be a thing

  • @dbroche
    @dbroche 5 лет назад

    Shoutout! 🙌🏼🙌🏼

  • @AndersonSilva-dg4mg
    @AndersonSilva-dg4mg 5 лет назад +2

    Thanks, interesting

  • @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.

  • @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??

  • @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 :)

  • @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 RUclips series & podcast used to be kinda the same thing, but they're separate now so we can do more visual stuff here.

  • @samirsaeedi74
    @samirsaeedi74 5 лет назад

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

  • @hyperupcall
    @hyperupcall 5 лет назад

    the color grading is too dark and green

  • @saulgarciaambriz4751
    @saulgarciaambriz4751 5 лет назад

    Saul say hi

  • @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

  • @joebazooks
    @joebazooks 5 лет назад

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

  • @MubashirAR
    @MubashirAR 5 лет назад

    no views
    33 likes
    k youtube

  • @jordmccord
    @jordmccord 5 лет назад

    Shout out to meeeee

  • @bartverkoeijen
    @bartverkoeijen Год назад

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