Daniel Thomas, a semi-professional footballer, posted offensive remarks about the two TeamGB divers on the micro-networking site on the 30th July 2012.

Paul Chambers was prosecuted after making a joke on Twitter

Mr Thomas had sent the tweet to his followers, but the remarks were soon retweeted around the Twitter platform and were seen by many thousands around the world.

The Communications Act 2003 makes it an offence to send something across an electronic communications network, if that message is "grossly offensive".

"There is no doubt the message posted by Mr Thomas was offensive and would be regarded as such by any reasonable members of society," Keir Starmer said.

"But the question for the CPS is not whether it was offensive, but whether it was so grossly offensive that criminal charges should be brought."

Mr Starmer said his prosecutors had concluded this was a one-off offence and Mr Thomas had taken reasonably swift measures to delete the comments.

The message had not been intended to reach the two divers and was not part of a campaign, or plan to incite others.

Before reaching its decision not to prosecute, the CPS said it contacted Daley and Waterfield and that both had indicated they did not think this case needed a prosecution.

Mr Starmer said: "This case is one of a growing number involving the use of social media that the CPS has had to consider. There are likely to be many more.

"Access to social media is ubiquitous and instantaneous. Banter, jokes and offensive comments are commonplace and often spontaneous. Comments intended for a few may reach many millions."

In recent months, police and prosecutors have been criticised by some for being too heavy-handed in their dealings with so-called online trolls and abusive messages.

1/12

Gallery: How Daley Won Bronze

Tom Daley only just qualified for the semifinals of the men's 10m platform event, coming 15th. The top 18 of 32 stayed in the competition

In one of the most controversial cases, Paul Chambers was convicted and fined £1,000 for making a joke about blowing up a UK airport.

In January 2010, Mr Chambers had booked a flight from Robin Hood airport in South Yorkshire. When he was prevented from flying because of snow, he wrote on Twitter: "Crap! Robin Hood airport is closed. You've got a week and a bit to get your s*** together otherwise I am blowing the airport sky high!!"

In March this year, Liam Stacey, a 21-year-old biology undergraduate at Swansea University, pleaded guilty to a charge under the Crime and Disorder Act of making racially aggravated comments, following the collapse of Bolton Wanderers Footballer Fabrice Muamba during a match.

He was given a 56-day jail term and became a national hate figure over the remarks which were posted as doctors battled to save the footballer's life.

Against the backdrop of these recent cases, the Director of Public Prosecutions said it was now time to issue new guidelines to help prosecutors balance the need to safeguard free speech but also deal with wrongdoing.

The CPS is planning to issue interim guidelines, before launching a wider public consultation.

Part of that process will involve a series of roundtable meetings with campaigners, media lawyers, academics and social media experts.

Mr Starmer said: "This is not just a matter for prosecutors. Social media is a new and emerging phenomenon raising difficult issues of principle" which, he added, had to be confronted not only by prosecutors, but by many others."