An embodiment of the present invention provides a communication method, device, electronic device, and storage medium for
client pages. The method includes: detecting whether a
client page has a need to communicate with other
client pages, where the client page and other client pages belong to the same client and are under the same
domain name; if so, obtaining the identifier corresponding to the client page as the sender identifier, the data to be sent corresponding to the client page, and the identifier of other client pages as the
receiver identifier; creating a message identifier, encapsulating the message identifier, sender identifier,
receiver identifier, and data to be sent into a message, and adding the message identifier to the message
list; recording the message in the
storage area of the client, so that other client pages can access the
storage area to obtain the data to be sent carried in the message. In this way, instant communication between different client pages with low latency and high
throughput can be achieved based on the shared client
storage area.