We address frequency-dependent quantum transport through mesoscopic conductors in the semiclassical limit. By generalizing the trajectory-based semiclassical theory of dc quantum transport to the ac case, we derive the average screened conductance as well as ac weak-localization corrections for chaotic conductors. Thereby we confirm respective random matrix results and generalize them by accounting for Ehrenfest time effects. We consider the case of a cavity connected through many leads to a macroscopic circuit which contains ac sources. In addition to the reservoir the cavity itself is capacitively coupled to a gate. By incorporating tunnel barriers between cavity and leads we obtain results for arbitrary tunnel rates. Finally, based on our findings we investigate the effect of dephasing on the charge relaxation resistance of a mesoscopic capacitor in the linear low-frequency regime.