Two-Way Messaging Between Components
Master more complex two-way communication using message passing for request-response interactions across extension parts.
Two-Way Messaging Intro
Welcome! In this lesson, you'll master two-way messaging, a powerful way for different parts of your browser extension to communicate effectively.
Unlike one-way messages, two-way messaging allows a sender to not only send a request but also to receive a specific response back from the receiver.
The Request-Response Model
Two-way communication follows a simple request-response model:
- A component (e.g., a popup) sends a message (the request).
- Another component (e.g., the background script) receives and processes it.
- The receiving component then sends a message back (the response).
- The original sender receives this response and acts on it.
All lessons in this course
- One-Way Messaging Patterns
- Two-Way Messaging Between Components
- Using Chrome Storage API
- Sync vs Local Storage & Quotas