Method for improving foaming properties of cleaning compositions for topical use, having a 4.0≦pH≦6.5, and including at least one foaming surfactant, includes incorporating an effective quantity of a cross-linked anionic polyelectrolyte into the cleaning composition, the cross-linked anionic polyelectrolyte being obtained through polymerization, in the presence of at least one cross-linking agent, of at least one monomer having a strong acid function, the monomer being 2-methyl 2-[(1-oxo 2-propenyl)amino]1-propanesulfonic acid, which is partially or completely salified, with at least one neutral monomer selected from the N,N-dialkyl acrylamides, wherein each of the alkyl groups includes between one and four carbon atoms and at least one monomer of formula (I), in which R is a linear or branched alkyl radical including eight to twenty carbon atoms, and n is a number greater than or equal to one and less than or equal to twenty.