Это видео недоступно.
Сожалеем об этом.

Clients API and Window Messaging

Поделиться
HTML-код
  • Опубликовано: 16 авг 2024
  • This tutorial covers how to use postMessage to send messages (data) between different tabs, even cross-domain tabs, and between service workers and tabs using the Clients API.
    Code from video: gist.github.co...
    Broadcast Messaging video: • Broadcast Channel API ...
    Opening Tabs and Windows video: • Opening Tabs and PopUp...
    0:00 Introduction and Setup
    2:20 Adding Listeners
    4:20 Opening Tabs and sending Window Messages
    7:45 Sending Messages to Service Workers
    10:25 Receiving Messages in Service Workers
    11:10 Client Id tracking
    12:54 Sending Messages from Service Workers
    14:23 Sending Messages to one Client
    16:52 Sending Messages to multiple Clients

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

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

    I'm very amazed by the in-depth knowledge you have on many of the complex topics like this. Thank you for sharing them with us.

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

    You are professional. Thank you so so much.

  • @alirezafereydoni2827
    @alirezafereydoni2827 2 месяца назад

    It was awesome explanation, thanks a lot

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

    I like your new Haircut 🤩

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

    Thank you so so much

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

    Hi in what scenarios in Real case scenearios I would like two tabs on the same browser on the same device for the same user to communicate with each other" ? What I could find was "Applications may need to maintain shared state or context between different tabs. For instance, in a web-based document editor, changes made in one tab should be reflected in other tabs to ensure consistency." Can you suggest any use case you might have worked on where the above is applicable

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 месяца назад +1

      A common case would be a user on an e-commerce site opening multiple tabs and adding items to a cart. Keeping the cart in sync between tabs.

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

      @@SteveGriffith-Prof3ssorSt3v3 Thanks and your videos are amazing, They cover a lot of depth about various nooks and crannies on this Topic.

  • @2005Azm
    @2005Azm Год назад

    Thank you sir

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

    What if I don't have access to another tab because I didn't open it..can a message be sent to a window I didn't open

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад

      If it is on the same origin then a service worker can access it as a client

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

      @@SteveGriffith-Prof3ssorSt3v3 I meant how will I send a message from a window to another window that I didn't open

  • @yaietc.7670
    @yaietc.7670 Год назад

    Hello sir, ive just finished this playlist on service workers and it helped a lot on my understanding. May i know if you have a video or playlist even on implementing push notification in service worker? Thanks!

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +1

      I don't have any videos on push notifications yet. I was waiting until they were supported in all browsers. Safari just started supporting them a couple months ago.

    • @yaietc.7670
      @yaietc.7670 Год назад

      @@SteveGriffith-Prof3ssorSt3v3 I see, then ill be waiting for those videos while learning still from others. These are interesting stuff, and your explanations are so well structured. Thanks again!

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

    Hello sir.
    I have a question And I hope you help me to solve it.
    First question is :-
    I HAVE Table on database called product I want to know how many user's visit each product on my website. To make a selection on my website called most viewed.
    The second question is:- how to make a limit to display products ber page and make multiple pages display the rest of products.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +1

      What does that have to do with the Clients API and messaging between windows?

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

      @@SteveGriffith-Prof3ssorSt3v3 nothing about that.
      I just comment it here to get attention from you to answer me. Because I see old videos of you about sql and I assume if I comment it there you will no see my comment.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +1

      @@ghostavosd4579 I see comments on any video. But I have limited time to respond to any of them.

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

      @@SteveGriffith-Prof3ssorSt3v3 okay thats cool,
      so can you help my in my two question?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Год назад +1

      @GhosTavo Sd thats not a quick simple question to answer in a comment.

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

    Video status: unauthorized views 😂