Run your website offline using Service Workers

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • 🚑. Make your website work offline using Service Workers 🚑
    This video covers how to use service workers to hook into the browsers fetch event and if they are offline, serve them static assets that have been cached on the client :)
    If you have any specific content you'd like me to cover please let me know via a comment/DM! 😁

Комментарии • 44

  • @KodyVanSloten
    @KodyVanSloten Год назад +1

    This is the first time I've ever rewatched an intro 😂Great job

  • @kill_switch_101
    @kill_switch_101 3 месяца назад

    finally found a great tutorial for this API!

  • @romanostash822
    @romanostash822 3 года назад +2

    Thank you for sharing this!

  • @ridhwwan
    @ridhwwan 2 года назад +1

    I'll like to apologise for taking so long to find your channel sire 🧙🏾‍♂️

  • @pocket1die126
    @pocket1die126 2 года назад +1

    great video. waiting for the one that updates the cache.

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

    This was really easy to use, thanks for sharing.

  • @clarasampaio1175
    @clarasampaio1175 6 месяцев назад

    Thank you so so much

  • @appolonguy-alain5282
    @appolonguy-alain5282 3 года назад +2

    Thank you, great it works very well. But how to update the caches when there is internet

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

      I may cover that in the future. but essentially what you would do is intercept the http calls and perhaps only use cache when the user is offline

  • @user-cj6te2oj4m
    @user-cj6te2oj4m 3 года назад +1

    Thanks this is exactly what i needed

  • @thearmor9231
    @thearmor9231 2 года назад +1

    Nice funny video and great content!

  • @NullPoint961
    @NullPoint961 Месяц назад

    my old caches are not being deleted when CACHE_NAME is changed, and also, when switched to offline mode my webpage doesn't appear like the video did

  • @phinok.m.628
    @phinok.m.628 2 года назад +2

    Ah, yeah... Don't you just love it, when people make programming tutorials, but then don't add a link to the sources in the description. Basically making anybody wanting to use it, type it off, run the video through OCR or just look for a different video that has sources?! :D

  • @TheGarageboyz
    @TheGarageboyz Год назад +2

    Possible to do this with php?

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

    is there a way to have a offline website that can actively be used such as receiving a message and sending one back while having no service?

  • @diptoshaa008
    @diptoshaa008 Месяц назад

    Bro,, i factched errors can you help me??

  • @afrographixstudio
    @afrographixstudio Год назад +1

    When i refresh the page , Chrome clear the cache automatically

  • @timothydavis5940
    @timothydavis5940 Год назад +1

    Will this work for a mobile phone accessing the website?

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

    Cool. What about cljs?

    • @onthecodeagain
      @onthecodeagain  3 года назад

      I'll get there :)

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

      @@onthecodeagain I mean: Service Workers + shadow-cljs.

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

      @@shegeley yeah I know! I'll try get a video on that.

  • @saniks5070
    @saniks5070 Год назад +1

    god

  • @reverseworld5768
    @reverseworld5768 2 года назад +1

    hello why my cache storage is empty

    • @pocket1die126
      @pocket1die126 2 года назад +2

      change the directory. remove the / in your '/index....' happened to me

  • @frontforumfocus
    @frontforumfocus 2 года назад +1

    I have an error navigator is not defined

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

      Thats odd. Make sure you've spelled it correctly and see if window.navigator returns anything in console?

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

      @@onthecodeagain I have but everything from my screen does not highlight anything

  • @frontforumfocus
    @frontforumfocus 2 года назад +1

    where is the code for this

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

      I didnt make a repo out of this and dont have the projects anymore

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

    Great
    But not showing clearly plz

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

    Hello can you send me a code

    • @onthecodeagain
      @onthecodeagain  2 года назад +1

      If someone creates a git repo for this I'll add it to the description :) dont have the code anymore