Online grocery firm Ocado reported a 28.7 per cent rise in underlying first half earnings but swung to a pre-tax loss after it pumped cash into its growing infrastructure.Ocado, which looks after the online operations of supermarket Waitrose and recently signed a deal with rival Wm Morrison, said EBITDA rose to £19.2m for the 24 weeks ended May 19th 2013 from £14.9m a year earlier as more customers switch to the internet for their grocery shopping. Revenue for the period rose 15.6% to £355.9m while gross sales jumped 15.2% to £382.7m. The rate at which new customers are being added each week remains strong, up 52.7% year-on-year. Average orders per week increased to 139,000, up from 122,000 in the first half of, an increase of 13.4%.The group also reported a pre-tax loss of £3.8m compared to a profit of £0.2m for the same period a year earlier."We remain well placed to take advantage of the accelerating structural changes in the industry as more customers choose online delivery for their grocery shopping," said Chief Executive Tim Steiner.Net debt at May 19th was £74.4m, up from £55.2m at December 2nd 2012.Ocado's shares fell 0.61% to 260.20p at 08:00 in London.CJ