Web-based applications have an ever increasing impact on modern society. Organizations spend an ever increasing amount of resources developing and maintaining web applications that are in fact their public face. Hence, each problem that an external user encounters using these products---either due to an external attack or a simple defect in the underlying code---often results in a loss for the organization itself. In order to reduce defects and prevent attacks web applications require a thorough testing. Unfortunately, nowadays testing a web application is a very complicated issue, primarily due to the vast use of AJAX technologies. To simplify and improve the testing procedures, we propose a method to register and replay web navigation, i.e., sequences of user's interactions with web applications. Then, we developed a tool that implements this method and tested it on various web applications, both real and synthetic, obtaining very positive results.