Better yet make it an extension for firefox

FIrefox's options have cache, history, temp files, downloaded files etc etc all stored. You could create an extension that runs with firefox and says, upon exit, clear all.
Id do it if I knew where to start.