Wash and rinse water can be hard/limey or soft, this affects the quality of wash and rinse. Choose a detergent and rinse aid that will work correctly with your water type.
Wash and rinse water need to be dosed correctly with detergent and rinse aid to remove soil from the glass, particularly the lip area, and to maintain hygienic conditions within the machine as washing takes place, and to rinse the glass effectively removing the wash water, assisting quick drying and providing a spot free finish.
Modern detergents do not cause beer head retention and lacing problems when selected correctly and dosed in the right amounts, and with adequate rinsing in place.
Detergent selection needs to take account of the water hardness/softness, size of wash tank, and dosing system. Many machines do not have a dosing system for the wash water, resulting in too much/little detergent being dosed by hand.
Correct detergent selection can mean that the poor washing characteristics of very hard water can be cancelled out. Also where food is served there may be high levels of protein being washed off glass surfaces into the wash water. With the right detergent problems with greasy non-rinsing films can be avoided. These problems result in poor head retention, and little or no lacing down the side of the glass.