iOS access to Safari Reader feature through UIWebView

Srikar Appalaraju picture Srikar Appalaraju · Oct 5, 2011 · Viewed 8.8k times · Source

I am using iOS 4.3 & was wondering if there is any way that I can access the Safari's "Reader" feature through which webpages are removed of ads & other riff raff & the content takes the center stage.

If one opens any article in Safari (on say Wikipedia website), then a "Reader" button appears on the URL bar. Clicking on it presents a new window presenting the content beautifully.

How can I leverage this this functionality in iOS through UIWebView ?

enter image description here

PS: I know there is something called Readability Project. But I have no idea how to use this through UIWebView. Also for some websites Safari's Reader takes a call not to enable "Reader" feature, maybe it has no sufficient confidence?

Answer

demosten picture demosten · Jan 12, 2013

Important: THIS ANSWER NO LONGER WORKS!

Readability shut down on September 30, 2016.

Here is something they recommend as a replacement: https://mercury.postlight.com/web-parser/

Keeping the answer as a historical reference

--- Original answer ---

You can use Readability mobilizer for this. You will get a cleaned up version of any article, in the Readability styling:

http://www.readability.com/m?url=http://{URLOFTHEARTICLE}

Just prepare the URL and load it in your UIWebView. Here is how it looks in action:

http://www.readability.com/m?url=http%3A%2F%2Fwww.cnn.com%2F2013%2F01%2F11%2Fshowbiz%2Ftv%2Fgolden-globes-tv-vineyard%2Findex.html%3Fhpt%3Dhp_abar