Ice on windshield interior

I have found that keeping a cheesecloth bag of white rice in my truck and car prevents this from happening. The rice absorbs any moisture from the interior air. Change it every year. I live in central NY state.