While hairspray can be used in a pinch to stiffen fabric, it's not recommended for hats as it can leave a residue and discolor the material.