The Director of Public Prosecutions is to issue new social media rules on abuse, after Team GB diver Tom Daley received offensive Twitter messages about his late father – and of a homophobic nature, earlier this summer.

According to the BBC, Keir Starmer QC said the move would help ensure “decision-making in these difficult cases is clear and consistent”.

It comes after a 17-year-old boy arrested on suspicion of malicious communications was released without charge.

In August, Daniel Thomas, 28, a semi-professional midfielder with Port Talbot FC, was arrested in connection with an anti-gay tweet about the Olympic diver and his colleague Peter Waterfield.

It was after they lost out on medals in the London 2012 synchronised men’s 10m competition.

Mr Thomas denied he had posted the homophobic message.

According to a club statement released at the time, Mr Thomas had been the victim of a “prank” and both the club and the footballer apologised “unreservedly” for the incident.

Earlier this summer and in regards to another case of Twitter abuse that Daley suffered, Simon Reed, the vice-chairman of the Police Federation told the Times that the police were “having to make it up” as they went along when it came to dealing with social media cases.

Last week, gay X Factor winner Joe McElderry spoke of his relief at the conviction of a 53-year-old man on harassment charges, after he set up a Twitter account called @mcelderrytruth, on which he called the singer a “vile hypocrite” and compared him with late North Korean leader Kim Jong-il.