If the idea of the internet as a pure tool of free speech appeals to you, take a good look. It could become the most restrictive form of publishing, warns a new book on censorship in the UK.

Every web user knows it. You need go no further than the nearest search engine to find things you certainly would not want to show your grandmother.

There are a lot of extreme websites out there, be they mean, obscene or downright scary. The convictions of Soho nailbomber David Copeland and former pop star Gary Glitter bear witness to this dark side of the web.

Glitter was jailed for 4 months for downloading child porn from the net

The question facing governments all over the world is how - if at all - they can protect the public, and specifically children, from harm without neutering the creativity of the internet.

Journalist Alan Travis, whose survey of the history of censorship in the UK has just been published, has reached a weary conclusion.

"Unfortunately, I think the great libertarian days of cyberspace, whereby you can have a very powerful medium beamed into every home which won't in some way be limited in terms of what material comes through, is over."

The position of the UK Government is that the same laws should apply to the virtual world as apply in the real world, he says. Unfortunately, these offline laws are themselves in a state of chaos. Some of the different acts are more than 100 years old, and have varying definitions of what is obscene.

A Donald McGill postcard, banned in 1954

Sorry tales

The British experience of censorship is not perhaps the most noble. Great works of literature have been attacked. James Joyce's Ulysses was banned in the UK for 14 years.

When the publishers of DH Lawrence's Lady Chatterley's Lover were being prosecuted at the Old Bailey, jury members were asked if it was the kind of book they would wish their wives or servants to read.

The question may have sounded appropriate in the late 19th Century, but this was in November 1960. Tie Me Kangaroo Down Sport was in the Top 20. Not many people had servants.

Lady Chatterley's Lover: The talk of 1960

It wasn't just literature, though. Even "saucy" seaside postcards such as those of Donald McGill were declared obscene and banned in Grimsby in 1954.

However, a variety of television watersheds, cinema ratings, and relaxed public attitudes have resolved many issues about standards. It seems that the law in England is gradually moving from its traditional targets of things that are likely to deprave or corrupt, towards things that actually cause harm.

But, says Travis, the internet changes the whole debate.

Potential for ludicrous cases

"How to enforce the law hasn't really been the issue. It has been possible to ban the importation of dirty books, it has been possible to close down magazines that were considered to be obscene, it has been possible to close down video shops who sold dirty videos to underage kids.

James Joyce with French poet Philippe Soupault

"What now becomes difficult for the first time is how you enforce those rules. The practical difficulties are what makes it a bigger debate in some ways, and gives it the potential for absolutely ludicrous cases and rough justice."

If the wrong laws are adopted, he says, it could be the end of the net as we know it.

"This is a much more powerful medium, and one which prides itself on universal access. But in the end it could turn out, because of the desire of people to regulate its content, to be one of the most narrow and restrictive in some ways."

Crude tools

How to find the right balance is difficult, he says, and the answers to the problem are not clear. But he personally favours a mixture of banning certain sites such as those which sexually exploit children, while giving parents the tools to decide what they want their children to see.

Alan Travis: The internet changes the debate

And web filtering tools are still crude, he says, blocking many sites which are innocent. These have included a site discussing Shitake mushrooms, mistaken for something altogether different.

Prime Minister Tony Blair has said he prefers to think of the issue as one of parental responsibility rather than the job of government.

But Travis warns of the Australian experience, where internet service providers have been made criminally liable for the content of the millions of sites that their subscribers can access.

That, he says, would make Mary Whitehouse's attempt to shut up Alf Garnett as part of a clean-up TV campaign look like a mere "flick round the house with a duster".

Bound and Gagged, A Secret History of Obscenity in Britain by Alan Travis is published by Profile Books at £16.99