Inspired by the discussion in the comments of this question, I'd like to ask the following question: is it possible to characterize the class of spaces that are homotopy equivalent (or weak equivalent) to compact Hausdorff spaces? As noted in the linked question's comments, no locally connected space with infinitely many components can be homotopy equivalent to a compact Hausdorff space. Are there any other restrictions? Is every path-connected space homotopy equivalent to a compact Hausdorff space? It seems plausible to me that every space might at least be weak equivalent to a compact Hausdorff space: perhaps the topology on an infinite CW-complex can be coarsened to be compact Hausdorff without changing the weak homotopy type.

Update: I've accepted Jeremy Rickard's answer, as it seems to more or less completely answer the case of weak equivalence (amazingly, every space is weak equivalent to a compact Hausdorff space iff there does not exist a measurable cardinal). The comments indicate that spaces having the (strong) homotopy type of compact Hausdorff spaces are much more restricted; I'd still welcome answers elaborating further on this.

4more comments