Optical microcavities have attracted tremendous interests in both fundamental and applied research in the past few decades, thanks to their small footprint, easy integrability, and high quality factors. Using total internal reflection from a dielectric interface or photonic band gaps in a periodic structure, these devices do not rely on conventional metal-coated mirrors to confine light in small volumes, which have brought forth new developments in both classical and quantum optics.