An optical in situ technique is presented for monitoring the optical thickness of transparent materials during focused-electron-beam (FEB)-induced deposition. Three precursors were used: formic acid [HCOOH], tetramethyl orthosilicate [Si(OCH3)4], and titanium nitrate [Ti(NO3)4]. Two of them led to optically interesting materials for ultraviolet or visible applications. By cofocusing a laser (514 nm) with the scanning FEB in the plane of the sample, we continuously monitored the intensity of the reflected light during deposit growth. Periodic intensity variations due to interference effects as function of deposit thickness were observed and interpreted. Complex-refractive indices at the 514 nm wavelength of the materials deposited from HCOOH, Si(OCH3)4, and Ti(NO3)4 were calculated from the periodic signal and were, respectively, 1.51+i0.055, 1.56+i0.14, and 2.19+i0.013.