1. A method for generating a transformed web application code, the method comprising: intercepting a web application code sent by at least one web server; providing at least one script; embedding the at least one script along with the intercepted web application code resulting in a transformed web application code, wherein the script collects and sends a representation of at least one client document object model (DOM) structure of the transformed web application code at least once when executed on a client; and building a deemed clean representation of the DOM structure of the transformed web application code, for comparison with the representation sent by the script at the server.