The long-rumbling battle to protect online freedom of speech has thrown up some unlikely martyrs. The mild-mannered office worker Paul Chambers elicited sympathy from most quarters after being arrested and prosecuted for an ill-advised tweet. The amateur pornographer Darryn Walker earned rather less when arrested (though ultimately cleared) after sharing his misogynistic fantasies about Girls Aloud. And I doubt anyone has wasted much sympathy on the Mancunian internet troll Colm Coss, who last week was sentenced to 18 weeks in prison for sending malicious and offensive communications.

What Coss did was, without question, utterly repulsive. He targeted Facebook tribute pages set up to honour high-profile tragedies, including one for Jade Goody and others for deceased children, including John Paul Massey, a Liverpool boy fatally savaged by a dog. The messages left included claims that he had committed necrophiliac acts upon their bodies. It is hard to imagine any form of trolling more obscene or grotesque, and I can quite understand that many people would be very happy to throw away the key. Tempting as that reaction may be, it is misguided.

The magistrate in Coss's case acknowledged that the CPS guidelines suggested a 12-week sentence, but she considered it such a serious instance that she doubled this tariff, before applying a 25% reduction for a guilty plea. According to the CPS, that makes his offence equivalent to some of the more serious cases of (unpremeditated) actual bodily harm. Really? Personally, I'm not even sure that Coss's actions were more harmful than cyberbullying, which has led to untold distress, particularly for children and teenagers. If 18 weeks is an appropriate sentence for the ugliest of trolls, what should we do with those who use Facebook to drive their peers to depression, self-harm or even suicide?

There was a time, not so long ago, when the prime objectives of the justice system were to protect physical wellbeing, integrity and property rights. With very little debate or awareness, we have slipped into a society where the justice system is equally concerned with protecting the intangible sensibilities of the individual. In that sense, this issue overlaps significantly with those around blasphemy and protection from religious insult. I can see no rational reason why causing severe, grievous offence to Jade Goody's admirers should be an imprisonable offence while causing severe, grievous offence to Christians or Muslims should be considered freedom of speech. It cannot be the role of the law to dictate which flavours of offence are reasonable and which are not. I cannot see any reason why an Islamic organisation, to take just one example, could not use this precedent to press charges against anyone who participated in the recent, juvenile "Everybody Draw Mohammed Day" that circulated online and grew in support on Facebook. And talking of pressing charges, is there anything to now stop Facebook UK or any other site host from dealing with persistent and egregious trolls by calling in the police and handing over IP addresses?

Whenever a high-profile celebrity dies, there is an almost instant eruption of sick and tasteless jokes in every office and playground in the land. They are told for amusement, to get a reaction, especially from those who are offended. Or, as we might say, "for the lulz". Are these now criminalised if circulated electronically? If not, what is the distinction? I cannot see it. Without naming names, if a controversial and divisive former politician were to die today, there might be a significant proportion of the population expressing vengeful delight, sometimes in the most crass and ugly terms, in full knowledge that their comments will cause widespread offence to others. A lot of new prisons might soon be needed to cope with the demand.

There have long been laws against harassment and against sending hate mail. These acts are obviously intrusive and intimidating and I can understand why the law might step in. But Coss's case is different, this is about use of an open access forum, an online equivalent of Speakers' Corner. Nor is this about censorship or moderation. Nobody but the most extreme libertarian would object when Facebook or any other site remove such messages and ban the offenders. That is right and proper, and the role of the site providers. This is specifically about the point at which the criminal justice system steps in to police online speech. That point has just significantly shifted. When will we acknowledge that it has shifted too far? Eventually we will have to accept that, along with perpetual vigilance, the price of freedom is the perpetual risk of offence.