apparatus and method for transforming web resources into safe versions such that malicious code on the resources cannot attack the client viewing the resources . the invention separates the processing of insecure code from the processing of benign code . for web pages , the benign code is displayed immediately to the client while insecure code is processed on a separate machine . once insecure code is processed , benign outputs of that code are passed to the client for display . the invention safeguards the client against known and zero day exploits without requiring a catalog of malware / virus signatures , heavyweight code checkers , complete page re - writing or highly restrictive access policies . the invention provides the client with complete malware blocking while retaining most of the original functionality of the web resource .