Abstract:The traditional Web IM requires both sides to install plug-ins (such as Adobe Flash Player) in the browser, which does not only reduce the user experience, but also increases the developers' tedious work for plug-in development, updating and maintenance. In addition, the traditional Web IM mainly adopts the method of the regular access server (the polling mode) to achieve the interaction between the browser and server, which reduces the real-time performance and increases the consumption of server resources. According to the problems above, this article implements the long connection between the browser and server and data interaction through WebSocket, which improves the real-time performance. Then on the basis of providing WebRTC API, we implement a module which performs the function of audio and video communication and file transfer. Through the MVC three-tier architecture model, we carry on the concrete division and implementation of the module. Finally, the test shows that the design can meet the basic functional requirements of the user.