Believe it or not, shaving cream is an excellent way to prevent mirrors or windows from becoming fogged over. Just smear shaving cream over the window/mirror and wipe it off using a damp cloth. It should now prevent the window/mirror from becoming fogged over from steam. If it wears off, just repeat the process.