One easy way to remove the metadata from a document is to duplicate the layer to a new document. You can do that with an action if you want to automate it so you don't really need a script.
If it is a multi-layer document select all the layers then dupe to new doc.
Yes, either will work as far as removing the metadata goes. However with Save For Web you are limited to which formats you can save, none of which support multiple layers.