We establish various properties of the definition of cohomology of topological groups given by Grothendieck, Artin and Verdier in SGA4, including a Hochschild–Serre spectral sequence and a continuity theorem for compact groups. We use these properties to compute the cohomology of the Weil group of a totally imaginary field, and of the Weil-étale topology of a number ring recently introduced by Lichtenbaum (both with integer coefficients).