The real answer is, it depends on the program itself, and how it's written (e.g. when does it move data to disk after being in RAM? What cache replacement policies does it use? How does the history clearing mechanism work?)
The only tired-and true ways to do this are (in preferred order):
- force the browser to store all temporary data in RAM as opposed to the hard drive (e.g. disable disk cache and enable/force the use of a RAM cache
- use a sandbox (e.g. Sandboxie)
- use a Virtual Machine (e.g. VirtualBox)
Note that just avoiding writing to disk is the most preferred secure option (it would be the fastest and ensure no sensitive data ever gets written on an HDD/SSD), but the least portable. For the ultimate portability, a virtual machine might be best (as many virtual machine programs are cross-platform), but a common and very feasible option less setup to configure for a correct, secure operation.
* even data stored in RAM can be recovered (see cold-boot attacks), although this requires physical access to the machine and is very time sensitive given the operation of dynamic RAM.
As a final word, I wouldn't really worry about the browsing history stored on the computer. It only really matters if someone has physical access to the machine, and even if that were the case, there's many things you can do to protect yourself.
I would be significantly more concerned about your internet usage being monitored at the access point. In the latter case, there's absolutely nothing you can do besides ensuring your traffic never passes through the access point monitoring your traffic (e.g. ensure the use of secure HTTP, or preferably, use a different network).