Load Web Pages in Readability-Mode in Your App

Adding a WebView to display external links in your app is trivial, but if you want to offer more to your users, you can provide them the option to load the same webpage as Readability.com’s text-optimized version.

They offer a easy to use (and very quick) API to return the optimized version, which you can incorporate in your app’s code. The APIs in question are nothing but URL schemes, which makes it that much easier to incorporate (no need for API keys or parsing JSON responses).

Load Readability View

iOS Simulator Screen shot 24-Jan-2013 12.43.57 PM

To load a webpage in the Desktop readability mode, pass the URL to Readability.com as follows:

http://www.readability.com/read?url=<your_url_string>

And to load the same in the mobile mode:

http://www.readability.com/m?url=<your_url_string>

And that’s it. With Cocoa, you can just create an NSURL with the above URL, and pass it to your WebView.

Just keep in mind that in your app, you might want to let users decide whether they want to view a webpage in the optimized format or not. An option in the settings perhaps.

 

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>