Britain's Crown Prosecution Service (CPS) is holding discussions on laws governing social media, with the aim of publishing guidelines by Christmas, after a flurry of cases concerning inflammatory Twitter and Facebook comments.

Police have expressed concern at the growing number of such cases they are being called on to investigate.

This week alone, two people have been sentenced for social media offences.

Teenager Matthew Woods was sentenced on Monday to 12 weeks in prison for offensive jokes on Facebook about missing Welsh five-year-old April Jones.

A day later Azhar Ahmed, 20, was given 240 hours of community service after writing "all soldiers should die and go to hell" on Facebook following the death of six British soldiers in Afghanistan.

The CPS has invited academics, media lawyers, bloggers and the police to participate in a month-long discussion.

A CPS spokeswoman said the talks were not primarily aimed at changing current law.

"At the moment the idea is to have clear, consistent guidelines across the prosecution of these cases within the existing law", she said.

The Guardian newspaper said the CPS was keen to ask whether social media companies should improve their site moderation.

The police, who have expressed concern over dealing with the growing wave of offences, welcomed the discussions.

"Many offensive comments are made every day on social media and guidance will assist the police to focus on the most serious matters", said Andy Trotter, spokesman for the Association of Chief Police Officers.

He added it was not only a matter of principle but "also the practicality of dealing with thousands of potential offences".

However, some say it is common sense rather than official guidelines that is needed for dealing with cases involving social media.

They include barrister John Cooper, who successfully defended a man in July who had been prosecuted for sending a "menacing" message threatening to blow up Doncaster's Robin Hood airport. The court ruled that message had been a joke and dismissed the case.

"The guidelines tend to be so strict that it actually railroads people into prosecuting where normally they wouldn't," he told Reuters.

The guidelines removed "discretion and the need and operation of common sense", Cooper added.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.