Great iPhone Web browser hack: make (unreadably) small text much larger!

Back in January, I’ve very thoroughly elaborated on the problems of Safari with some pages like THIS and THIS partly caused by the lack of any kind of character size increasing (and, with the Thinkpad thread, the lack of correctly reflowing / breaking long words / URL’s).

Thanks to forum user ‘ihadmeavision2’, I’ve found a forum post that explains what needs to be done. It’s very simple: just put the following scriptlet in your Favorites list and whenever you’re on a Web page that uses unbearably small characters, just tap on it:

javascript:for(i=0;i<document.getElementsByTagName('*').length;i++)void(document.getElementsByTagName('*' )[i].style.fontSize='18pt');

Please consult THIS for more info on how scriptlets can be added to Safari and all scriptlet-capable third-party iPhone Web browsers; most importantly, iCab Mobile.

Some before/after shots:

(from the original thread)

(the thread. Note that the Safari engine has been fixed since January; now, “only” the message that has the long word / URL is rendered with a very small charset; all the others can be easily zoomed in with the usual double taps (old sceenshot HERE). Also note that increasing the character size with the oversized URL didn’t result in being correctly reflown; now, you need to scroll to the right to read the message, just like in the case of simply zooming in)

(Pocket PC Thoughts, Landscape mode; note that, in the meantime, the PPCT engine seems to have been made much more iPhone-friendly with far larger chars than before. See THIS and THIS for the older screenshots.)

(Pocket PC Thoughts, Portrait mode)

UPDATE (12/01/2009): I’ve posted an entire tutorial to adding scriplets. In addition, the new article has a lot of additional goodies:
- Find in page with Next functionality (!)
- New versions of the scriptlets deployable right on the iPhone, even in Safari
- A complete report on all (scriptlet-capable) iPhone Web browsers’ compliance of handling purely Javascript (clickable) links (that is, ones that don’t start with http:// but with javascript: )
- Another scriptlet that increases the distance between text rows (excellent for pages messed up by the earlier "make text bigger" scriptlet)

Please see


Master your iPhone in one minute a day: Sign up here to get our FREE Tip of the Day delivered right to your inbox.

Author Details

Author Details

Werner Ruotsalainen

<p>Werner Ruotsalainen is an iOS and Java programming lecturer who is well-versed in programming, hacking, operating systems, and programming languages. Werner tries to generate unique articles on subjects not widely discussed. Some of his articles are highly technical and are intended for other programmers and coders.</p>
<p>Werner also is interested in photography and videography. He is a frequent contributor to not only mobile and computing publications, but also photo and video forums. He loves swimming, skiing, going to the gym, and using his iPads. English is one of several languages he speaks.</p>