there to one of the feed lines 13 which leads to the foam outlets 14 of a distributor 15 which insures that the total mass of foam fed in at a connecting line 16 is distributed uniformly over the foam outlets 14 in the illustrated embodiment two foam mixers 17 and 18 are assigned to the distributor these are connected to the connecting line 16 via lines 19 and 20 in which valves 21 and 22 are arranged by selective operation of the valves 21 and 22 either the foam from the foam mixer 17 or the foam from the foam mixer 18 can be fed to the distributor 15 rinsing water can be fed in if required through the line 23 and the valve 24 for instance after the work is completed in operation of the device the foam is fed in via feed lines 13 the connecting canals 12 and the feed canals 8 to the slot 8 at points distributed over the length of the slot the feed is at a right angle to the slot 8 so that the foam is deflected before it can emerge from the slot into the web of material 1 and is thereby made more uniform under the slot 8 a cushion 25 or 25 39 which presses the web of material 1 against the sliding surface 5 with gentle pressure is arranged on the back of the web of material 1 in the embodiment shown in fig1 to the left and in fig2.