  An overview is presented of the H$_2$ quasar absorption method to search for
a possible variation of the proton--electron mass ratio $\mu=m_p/m_e$ on a
cosmological time scale. Details of the analysis of astronomical spectra,
obtained with large 8--10 m class optical telescopes, equipped with
high-resolution echelle grating based spectrographs, are explained. The methods
and results of the laboratory molecular spectroscopy of H$_2$, in particular
the laser-based metrology studies for the determination of rest wavelengths of
the Lyman and Werner band absorption lines, are reviewed. Theoretical physics
scenarios delivering a rationale for a varying $\mu$ will be discussed briefly,
as well as alternative spectroscopic approaches to probe variation of $\mu$,
other than the H$_2$ method. Also a recent approach to detect a dependence of
the proton-to-electron mass ratio on environmental conditions, such as the
presence of strong gravitational fields, will be highlighted. Currently some 56
H$_2$ absorption systems are known and listed. Their usefulness to detect
$\mu$-variation is discussed, in terms of column densities and brightness of
background quasar sources, along with future observational strategies. The
astronomical observations of ten quasar systems analyzed so far set a
constraint on a varying proton-electron mass ratio of $|\Delta\mu/\mu| < 5
\times 10^{-6}$ (3-$\sigma$), which is a null result, holding for redshifts in
the range $z=2.0-4.2$. This corresponds to look-back times of 10--12.4 billion
years into cosmic history. Attempts to interpret the results from these 10
H$_2$ absorbers in terms of a spatial variation of $\mu$ are currently hampered
by the small sample size and their coincidental distribution in a relatively
narrow band across the sky.
