A method for controlling the formation of foam in a liquid container , • wherein a liquid (P) is fed to the liquid container , is treated and remains there and is carried away out of the liquid container as a treated liquid (P') below a free surface (N) formed by the liquid (P) in the liquid container , • wherein a foam (S) forming out of the liquid (P) at a liquid temperature (T3) is released above the free surface (N) and grows, • wherein the growing foam (S), starting at a heating distance (h) from the free surface (N), firstly experiences heating of the liquid temperature (T3) to a heating temperature (T1) in a register system consisting of a heating (20.1) and a cooling register (20.2), • wherein the heated foam (S) that grows further then, starting at a cooling distance (k) from the heating distance (h), experiences cooling to a cooling temperature (T2) in the register system , • wherein means for carrying out the heat exchange for heating and cooling the foam (S) are permeable to the flow in a direction of growth of the foam (r(S)), • wherein the heating and/or cooling temperature (T1, T2) is/are adjusted depending on the properties of the liquid (P) and/or treated liquid (P') and/or on the physical constraints, and • wherein the properties of the liquid (P; P') are understood to be the volumetric flow rate, viscosity, pressure, temperature and/or composition of the liquid (P) in the region in which said liquid is fed into or in the region in which said liquid is carried away out of the liquid container , and the physical constraints are understood to be the pressure and/or the result of the defoaming in the liquid container . • wherein a liquid (P) is fed to the liquid container , is treated and remains there and is carried away out of the liquid container as a treated liquid (P') below a free surface (N) formed by the liquid (P) in the liquid container , • wherein a foam (S) forming out of the liquid (P) at a liquid temperature (T3) is released above the free surface (N) and grows, • wherein the growing foam (S), starting at a heating distance (h) from the free surface (N), firstly experiences heating of the liquid temperature (T3) to a heating temperature (T1) in a register system consisting of a heating (20.1) and a cooling register (20.2), • wherein the heated foam (S) that grows further then, starting at a cooling distance (k) from the heating distance (h), experiences cooling to a cooling temperature (T2) in the register system , • wherein means for carrying out the heat exchange for heating and cooling the foam (S) are permeable to the flow in a direction of growth of the foam (r(S)), • wherein the heating and/or cooling temperature (T1, T2) is/are adjusted depending on the properties of the liquid (P) and/or treated liquid (P') and/or on the physical constraints, and • wherein the properties of the liquid (P; P') are understood to be the volumetric flow rate, viscosity, pressure, temperature and/or composition of the liquid (P) in the region in which said liquid is fed into or in the region in which said liquid is carried away out of the liquid container , and the physical constraints are understood to be the pressure and/or the result of the defoaming in the liquid container . <EOS>