ABSTRACT For future surveys of fast radio bursts (FRBs), we clarify information available from cosmic dispersion measures (DMs) through cross-correlation analyses of foreground dark matter haloes (hosting galaxies and galaxy clusters) with their known redshifts. With a halo-model approach, we predict that the cross-correlation with cluster-sized haloes is less affected by the details of gastrophysics, providing robust cosmological information. For less massive haloes, the cross-correlation at angular scales of ${\lt} 10\, \mathrm{arcmin}$ is sensitive to gas expelled from the halo centre due to galactic feedback. Assuming 20 000 FRBs over $20\,000 \, {\rm deg}^2$ with a localization error being 3 arcmin, we expect that the cross-correlation signal at halo masses of 1012–$10^{14}\, {\rm M}_\odot$ can be measured with a level of ${\sim} 1{{\ \rm per\ cent}}$ precision in a redshift range of 0 < z < 1. Such precise measurements enable one to put a 1.5 per cent level constraint on $\sigma _8\, (\Omega _\mathrm{M}/0.3)^{0.5}$ and a 3 per cent level constraint on (Ωb/0.049)(h/0.67)(fe/0.95) (σ8, ΩM, Ωb, h, and fe are the linear mass variance smoothed at $8\, h^{-1}\mathrm{\,Mpc}$, mean mass density, mean baryon density, the present-day Hubble parameter, and fraction of free electrons in cosmic baryons today, respectively), whereas the gas-to-halo mass relation in galaxies and clusters can be constrained with a level of $10$–$20{{\ \rm per\ cent}}$. Furthermore the cross-correlation analyses can break the degeneracy among Ωb, h, and fe, inherent in the DM–redshift relation. Our proposal opens new possibilities for FRB cosmology, while it requires extensive galaxy redshift catalogues and further improvement of the halo model.