Cranberry is thought to help in two ways. Firstly components of cranberry (possibly proanthocyaniclins) inhibit bacteria such as E coli from attaching to the lining of the bladder. Secondly, cranberry contains hippuric acid which has antibiotic activity and helps to render bacteria harmless. Vitamin C is also thought to have a preventative action for those susceptible to recurrent attacks.