Forum Moderators: not2easy
Thanks
User requests a page from Server A. Server A fetches the request from Server B and pass it on back to the user. The process is transparent to the user. Server A may want to pick a server from a server farm (load balancing). In your case, server A can fetch the request from content server, pass it through a Perl script/module which strips all unnecessary code. I think this can be accomplished with mod_rewrite, mod_perl and PerlResponseHandler.
I guess in your case writing the stripping script would be the hard part. I am sure if you look around you can find either Perl modules that can do that, or some command line utility or something of sorts. I can imaging this problem came up many times.