Tricks for keeping glass from fogging up racing on cold nights?

Have heard using shaving cream on windshield will keep it from fogging up. Any experience with that, or other suggestions?
I have had issues seeing out of the car on cold nights racing, might be dealing with it this coming weekend