Many web pages would load up a heck of a lot faster on the iPhone’s Mobile Safari browser if you weren’t stuck waiting for “LOWER YOUR INTEREST RATES NOW” and the like to push through on Mobile Safari. If you’ve jailbroken your iPhone or iPod touch, however, there’s a none-too-hard hack you can make to block a good number of ads from slowing down your page loads. Here’s the step-by-step instructions for doing so:
root and alpine, respectively. The connection may take a few minutes at first, and you may be asked to accept a host key; say yes to any prompts, and be prepared to try again if the connection fails at first./etc folder at your device’s root. Grab the hosts.php file you see there, and place it somewhere secure on your computer (i.e. somewhere it won’t get over-written with the James is Bored modified file). This can usually be done in a drag-and-drop fashion.hosts.php file to your device and replace the version there. Close your FTP client, and restart your iPhone or iPod touch.You should start seeing blank spaces or compressed frames where ads used to be. This hack will still leave blank spaces where Flash-based ads would normally be, but display ads from a number of common ad servers should be blocked. If anything important gets blocked, you can easily re-copy your original hosts.php file back to your device.
I found a few sites—including the New York Times—where the ad-blocking just didn’t seem to work, likely because the ads are served through an in-house server. Other places, it worked liked a charm.
Got another method for scaling back ads on your iPhone? Have a better, compatible hosts file to replace the default with? Tell us about it in the comments.
Toka
December 12, 2008 at 5:45 AM
Nice extensive hosts file – seems to do the trick. Just one thing – it’s not a hosts.php file. It’s just a hosts file. As per the *nix /etc/hosts – has nothing to do with php – and if you look at the saved file, it has no extension (as it should be)
Report Permalink