0
Posted May 15, 2012 by Sandeep Sharma in Apple
 
 

How to Adjust the Font Size of Web Pages in Safari for iOS

apple-safari-browser
apple-safari-browser

What would you do if you notice the unreadable font size of a webpage on your iOS device? Most of you guys will use reverse pinch gesture in order to increase the zoom size for better readable experience right? But what about a case where a webpage has a fixed width? Reverse pinch would do nothing in this case. However, you can use the Reader feature in your iOS device but again it is not applicable for all websites. Additionally, the feature works only for iOS 5 enabled devices. So what would you do?

Adjust the Font Size of Web Pages in Safari for iOS

A Mexican based blogger Marcos Kirsch has got the simple and effective solution to fix this issue using handy bookmarklets. A bookmarklet is an applet, a tiny program, stored as the URL of a bookmark in a web browser or as a hyperlink on a web page.

The blogger suggests two font size increase and decrease buttons using those simple JavaScript bookmarklets to quickly change the font size on any page. The process for creating those size increase and decrease buttons is pretty simple:

  1. Open Safari browser on your iOS device and create a new bookmark for any page to the bookmarks bar
  2. Tap the Bookmarks button and tap to the edit
  3. Name the new bookmark you just created to a minus (-) or plus (+) symbol. Replace the URL by pasting javascript code shown below.

JawaScript Code for font size (-)

javascript:var p=document.getElementsByTagName(‘*’);for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace(“px”,”"));}else{var s=12;}s-=2;p[i].style.fontSize=s+”px”}

JawaScript Code for font size (+)

javascript:var p=document.getElementsByTagName(‘*’);for(i=0;i<p.length;i++){if(p[i].style.fontSize){var s=parseInt(p[i].style.fontSize.replace(“px”,”"));}else{var s=12;}s+=2;p[i].style.fontSize=s+”px”}

That’s it! Your eyes would immediately thank you.

Once you have installed the bookmarklets, just place them on the Bookmarks Bar for quick access, open your Bookmark Menu and tap the ‘+’ symbol to make small fonts larger or just tap ‘-’  to make large font small. If you want to reset the font size then simply reload the webpage.

 

source


Sandeep Sharma

 
Sandeep is editor and founder of cellularism.com who loves to talk about smartphones and tablets. He spends most of his time reading and writing about it. He is currently using Samsung Wave. Find Sandeep Sharma on Twitter @cellularism and on Google +