Originally Posted by k corbin
The spray foams can create a rather sticky mess and they will overfill so you also have that to clean up after it cures. But there is a quick and easy alternative for filling in that gap that might work for you if your gap is not extremely narrow. That alternative insulation is closed cell, foam "backer rod". It is typically used to fill in overly wide gaps you want to apply caulk over. Close cell foam is a good insulator and it does not absorb moisture.
This is a very good and imprtant comment for two reasons. First, because the spray foam expands and expands and expands, usually beyond what you expect, and for a longer period of time than you would expect. Hours later you might still find a bloom of it had blossomed out of somewhere and it is hard to clean up. Needs acetone when wet and a razor knife and sandpaper when dry.
Second, spray foam is not waterproof. Over the counter spray foam is open cell, meaning the little bubbles inside it are all open to each other like a kitchen sponge. It soaks up and holds water for a long time. In contrast, closed cell products like closed cell backer rod have bubbles that are all closed from each other, like little balloons. They do not take water in. Closed cell foam is used in the hull of boats for that reason. Closed cell foam comes in a two part mix and then you pour it into the cavity to expand.
By the way, although not for window gaps like we are talking about here, if anyone knows of a spray closed cell foam product I would have a thousand uses for it but have never been able to find a closed cell foam other than a mix and pour.