In an interview with Sky's Dermot Murnaghan, Kier Starmer said that it could be "highly relevant" for police to consider whether comments were removed quickly and an apology given when deciding whether to prosecute an individual. However threatening or racist messages, or those that breached court orders, would likely still be prosecuted, he said.
"There's a lot of stuff out there that is highly offensive that is put out on a spontaneous basis that is quite often taken down pretty quickly and the view is that those sorts of remarks don't necessarily need to be prosecuted," Starmer said.
"I think that if there are too many investigations and too many cases coming to court then that can have a chilling effect for free speech. This is about trying to get the balance right, making sure time and resources are spent on cases that really do need to go to court, and not spent on cases which people might think really would be better dealt with by a swift apology and removal of the offending tweet," he said.
However, he said that Twitter was not a place where people could "go and say what they like", adding that his comments did not amount to a "get-out-of-jail card".
Under section 127 of the Communications Act it is an offence if someone "sends by means of a public electronic communications network a message or other matter that is grossly offensive or of an indecent, obscene or menacing character".
The Crown Prosecution Service (CPS) is currently consulting on guidance setting out the approach that prosecutors should take in cases involving social media in England and Wales, following a string of high profile court cases. Interim guidance was published at the end of 2012.
Luke Scanlon, a social media law expert with Pinsent Masons, the law firm behind Out-Law.com, warned that the DPP's comments only applied to potential criminal investigations. Social media users that post defamatory messages could still be liable for damages in the civil courts even if comments were removed quickly, particularly if they had already been redistributed by other users of the site or service, he said.
"While the DPP is taking the view that a quickly removed tweet may not be investigated in terms of whether it is grossly offensive, there is no guarantee that the same tweet will not be subject to a civil action if it also unfairly damages someone's reputation," he said.
"Where a tweet is defamatory in nature the fact that it has quickly been removed may not be of any significance if it has been re-tweeted or otherwise further made available online. As, under the current state of the law, a new cause of action arises each time a defamatory statement is published, the damage resulting from a defamatory tweet could be substantial even in circumstances where it is quickly removed," he said.
Lord McAlpine, the former Conservative party treasurer, is currently seeking damages worth £50,000 in the High Court after he was falsely named as a paedophile on Twitter. He is suing Sally Bercow, wife of the House of Commons speaker, and has threatened legal action against other "high profile" Twitter users.
In September, the DPP announced that he would not pursue a prosecution against Daniel Thomas, a semi-professional footballer, for a "homophobic message" Thomas had posted about Olympic divers Tom Daley and Pete Waterfield. The announcement came shortly after the High Court dismissed charges against Paul Chambers, who had tweeted that he would "blow [Nottingham Airport] sky high" when adverse weather threatened to delay his flight.
In its interim guidance, the CPS has suggested that tweets which may breach court orders, constitute "credible threats of violence" to a person or damage to property and those which "specifically target an individual or individuals and ... may constitute harassment or stalking" should be "prosecuted robustly" where they satisfy general evidence and public interest requirements. Tweets which may be considered "grossly offensive, indecent, obscene or false" will instead be subject to a "high threshold" with prosecution "unlikely to be in the public interest" in many cases, it said.