In reply to Stuart Williams:
Right, the collective wisdom of a bunch of oceanographers and coastal scientist is that no one really knows.
The source of the foam is clear - waves impacting on the cliff aerates the water creating foam. The foam drifts away from the cliff, pushed along by reflected waves and associated small, localised currents.
We then have two hypotheses as to why a snaking line of foam is formed:
The line is the convergence between the foam floating away from the cliff and Stokes drift from incoming waves (Stokes drift is a surface current caused by waves).
The line is where the foam drifting away from cliff meets a longshore current (probably tidal in the UK). The current drags the foam along in a streak - this can be seen in foamy rivers where a streak of foam is formed between the main stream and an eddy.
So how do we test these hypotheses? If the mechanism is the latter, then it won't be seen in places with no significant longshore current. Sea cliffs in the Mediterranean would fit the bill such as Majorca, Costa Blanca, Sardinia, Kalymnos etc. If anyone felt the urge, they could trawl through UKC photos. We would need examples where foam is clearly generated by small wave action on a cliff or rocky coastline and then we can see whether or not a line is formed.
There may, of course, be several factors that contribute to the formation of the line so I doubt we'll get a definitive answer.