Abstract: A method of detecting and replacing advertisements within HTML documents provided to a user of a web browser is presented, where the user is operating with a computer display as part of a server based computing environment. The method providing for the replacement of advertisements based upon different criteria according to the computing environment, examples including increasing revenue generated to the owner of the server, referencing products from other divisions of an enterprise owning the server in preference to competitors, removing inappropriate advertisements for young users accessing the server, and providing advertisements in relation to other applications and data running being run by the user on the server.