The Shulchan Arukh (O.C. 451:26) codifies the view taken by many Rishonim that glassware that had been used for chametz – even if it had been used for long-term storage of chametz – may be used on Pesach without kashering. According to this view, glass, unlike other materials, is incapable of absorbing food or liquid. As such, a glass utensil that had been used with chametz needs to be thoroughly cleaned to ensure the removal of actual chametz, but no kashering is required to extract absorbed chametz from its walls. The Rama, however, notes that Ashkenazic custom follows the stringent view, which maintains that to the contrary, glass utensils that had been used with chametz cannot be used on Pesach, and cannot even be kashered. The Mishna Berura explains that according to this view, Halakha treats glassware like earthenware, since glass is made from sand, which resembles earth. Hence, just as earthenware is assumed to absorb the food it contains, and this absorbed matter is then incapable of being completely expunged from the utensil’s walls, glassware likewise cannot be kashered.
As mentioned, Ashkenazic communities follow the stringent opinion and do not use on Pesach glassware that had been used with chametz. And, despite the Shulchan Arukh’s lenient ruling, some Sepharadim nevertheless adopted the Rama’s position as a measure of stringency, as noted by the Sedei Chemed (Ma’arekhet Hei, 29).
In between these two extremes, the Ben Ish Chai writes in one of his published responsa (Rav Pe’alim vol. 3, O.C. 29) that the custom in Baghdad was to kasher glassware for Pesach by filling the utensils with water, leaving the water there for a day and then pouring the water out, a process which they perform once a day for three days. This practice is based on the Shulchan Arukh’s ruling earlier (451:21) that earthenware containers that had been used with beer may be kashered in this fashion. The Mishna Berura (451:17) explains that it is only when an earthenware utensil absorbed food or liquid through heat that the absorbed food or liquid is assumed incapable of being fully expunged from its walls. If the utensil was used only with cold food or liquid, then although it absorbs, the absorbed matter is capable of being expunged through the process of milui ve-irui – filling then utensil with water, emptying it after a day, and then repeating the process two more times. Accordingly, it became customary among some communities to accept the premise of the stringent view, that glassware is treated halakhically as earthenware, but to permit kashering the way earthenware can be kashered after having been used with cold chametz. Since it can generally be assumed that glassware is not used with very hot food or liquid, it can – according to this custom – be kashered through the process of milui ve-irui. (The status of pyrex and other types of glass capable of withstanding heat may be different in this regard; we speak here only of ordinary glass.)
The Mishna Berura (451:156) cites the Chayei Adam as ruling that even according to the Ashkenazic custom, not to allow kashering of glassware, one may kasher glassware through the process of milui ve-irui if no other options are available. Since it can be assumed that the glassware had not been used with hot food or water, it may, under extenuating circumstances, be kashered in this fashion.
Nowadays, of course, the widespread custom among Ashkenazim is to buy a separate set of glassware for Pesach and not to rely on the Shulchan Arukh’s ruling or even on the method of milui ve-irui.