Jamesisbored published a guide, that shows how to block ads, that show up in Safaribrowser during web surfing.
MobileSafari has one major drawback. Up until now, there was no way to block ads. Ads increase the load time of a webpage, and especially on EDGE cause the internet to crawl. Blocking them will give you a lot of extra speed. This is one of the simplest hacks available for your iPhone. You will need to be Jailbroken and have the 2.0 Update, or later.
Connect to your iPhone through SSH, iPhoneBrowser, or some other tool.
Navigate to /etc/.
Now download this replacement hosts file. Replace iPhone's file with this one.
Restart your iPhone!
This hack has been tested and confirmed to be working on the iPhone 2.1 Update.