silver foil sticks to melted glass, and when you heat it afterwards, it dissolves in the glass, kind of like sugar in water, and colorizes the glass. I have no idea about tinfoil (which is really aluminum foil these days), but tin was used to make glass iridescent way back in the 30's when carnival glass was a thing. Nowadays, they use tin chloride, heat it up until it fumes, then place the glass object in the fumes and let the tin condense on the surface to make the glass iridescent (or they mist the hot glass with a SnCl solution). But I'm not sure what
@Aeroknow was refering to when he said tin foil and glass was his specialty.