How to move temp file of Safari?

Hi,
i want to move the temp file of Safari to ramdisk
anyone have an idea how to do it?

what about chrome?

thanks