A flow control strategy to improve the efficiency of plane diffusers, based on the introduction of local flow recirculations along the diffuser diverging walls, is investigated. Three reference diffuser configurations, all with laminar flow and with the same area ratio (AR=2) but with different divergence half-angles (α=2∘, α=3.5∘ and α=5∘), are considered. The variation of the divergence angle produces different flow patterns: in the diffuser with α=2∘ the flow is attached along the diverging walls, while the diffusers with α=3.5∘ and α=5∘ are characterized by asymmetric zones of separated flow with different extents. Local recirculations are obtained by means of properly contoured cavities, whose geometries are optimized in order to maximize the pressure recovery in the diffusers. The introduction of the optimal cavities leads to an increase in pressure recovery for all the considered configurations, even when no separation is present without the introduction of the cavities. The success of the control is due both to a virtual geometry modification of the diffuser and to a reduction of the momentum losses in the small recirculation regions inside the cavities. Classical shape optimizations of the diverging walls are also carried out by using Bézier curves. If an adequate number of degrees of freedom is used in the optimization, the optimal geometry corresponds to the presence of one or more localized recirculation regions along the diffuser optimized diverging walls, i.e. to a flow configuration that is very similar to the one characterizing the diffusers with optimized cavities. The efficiency increases provided by the shape optimization are comparable to those given by the contoured cavities.