The invention discloses a method and a
system for communication between web pages and application of the method and the
system in music search. The invention is to solve the problems of interruption of play of the current page, bandwidth waste and untimely response of the prior means adopted of refreshing the pages or
polling a
server. The method comprises the following steps that: a
web page A of a
client sends out an operation request and then waits for reply of the
server; when the
server receives a trigger request sent out by another
web page B of the
client, the reply of the operation request of the corresponding
web page A is returned to the
client; and the client performs corresponding operation on the web page A according to the reply. As for the client, the method does not need
polling the server and only needs connection for once, thereby the bandwidth and server resources are greatly saved. Simultaneously, when the server obtains another trigger request, the server can reply to the client, thereby the real-time communication ability is guaranteed to the maximum degree and simultaneously refreshing of the pages is avoided. Moreover, the method and the
system are also suitable for communication between two unrelated web pages.