Ammonia is used to prepare glass cleaner instead of Caustic soda. Caustic soda is a strong corrosive base. It cleans toilet floor, tiles smoothly and make it bright. Since there is no glass component in tiles or floor, hence it does not occur any harmful reaction.
Ammonic cleans the glass and it does not react with the main component silicon (SiO2) of glass. But if NaOH is used instead of ammonia, then it reacts with SiO2 and make sodium silicate. In this case glass will be decayed. That is why Caustic soda is not used to prepare the glass cleaner.
NaOH + SiO2 → Na2 SiO3 + H2O