Frothy masses of bubbles are often seen on a wide range of plants in summer, which can look unsightly.
The 'spit' is actually a protective bubble wrapping for a small insect, called a froghopper, which sucks the plant sap and distorts the young growth of flowering plants, such as chrysanthemum, geum, rosemary and solidago. It protects the insect from attack by predators and stops it from drying out.
Cuckoo spit is a mass of frothy bubbles on stems of plants. Closer investigation will show the froghopper inside.
Although froghoppers rarely do much if any damage, they can be unsightly.
Spray plants with a suitable, broad spectrum insecticide. Alternatively, hose plants with a strong jet of water to wash off the hidden insects.