  The propagation of gamma-rays over cosmological distances is the subject of
extensive theoretical and observational research at GeV and TeV energies. The
mean free path of gamma-rays in the cosmic web is limited above 100 GeV due to
the production of electrons and positrons on the cosmic optical and infrared
backgrounds. Electrons and positrons cool in the intergalactic medium while
gyrating in its magnetic fields, which could cause either its global heating or
the production of lower-energy secondary gamma-rays. The energy distribution of
gamma-rays surviving the cosmological journey carries observed absorption
features that gauge the emissivity of baryonic matter over cosmic time,
constrain the distance scale of $\Lambda$CDM cosmology, and limit the
alterations of the interaction cross section. Competitive constraints are in
particular placed on the cosmic star-formation history as well as on phenomena
expected from quantum gravity and string theory, such as the coupling to
hypothetical axion-like particles or the violation of Lorentz invariance.
Recent theoretical and observational advances offer a glimpse of the
multi-wavelength and multi-messenger path that the new generation of gamma-ray
observatories is about to open.

Cosmology and Nongalactic Astrophysics;High Energy Astrophysical Phenomena;High Energy Physics - Phenomenology