A mesoscopic bilayer TiO2 film used as an electron collector in conjunction with an acetonitrile- or ionic liquid-based electrolyte greatly improves the performance of dye-sensitized solar cells (see figure). The thickness of the nanocrystalline TiO2 film affects the photovoltaic characteristics, particularly for the ionic-liquid-based electrolyte, owing to a limitation of the photo-current by the diffusion of I-3(-) ions.