Paul Haine | Client-side developer, designer and writer

Guardian for iPad

Paul Haine, June 19, 2011

Over a few weekends I knocked together an app-style webapp using the Guardian Content API, formatted for viewing on the iPad though I imagine it’ll work fine on wacky Android-based hardware as well and even desktop browsers of a certain vintage:

g.joeblade.com

Guardian for iPad

How it works

It goes off to the API and gets the editors’ picks from a selected few sections, and then tops it up from the latest from that section, usually giving you about 15 articles per section. Tapping an article shows that article, plus if you’re online and that article is part of a package, sibling articles will display at the bottom.

I use localStorage to cache the API data for an hour, but you can refresh it yourself at any time from the toolbar. If you visit the app more than an hour later, it will automatically refresh. If you’re offline obviously it won’t refresh but you should find it possible to use the app thanks to HTML5’s offline functionality.

I recommend adding the page to your home screen so you can launch it without browser chrome.

Caveats and notes

Portrait orientation is recommended over landscape. Landscape will work but is a little crappy as I haven’t had much time for it yet.

Swiping left and right will switch sections, though I’m not happy yet about how this works as it’s a little temperamental.

Video and audio should be playable when they appear, so long as you’re using a browser that supports the MP4 and MP3 codecs.

I haven’t done a lot of checking in browsers other than Safari because I made this for me, and Safari is what I use. Fixing any bugs in other browsers is low on the to-do list.

Some things turn up in the article stream despite not being articles — Sudoku, for instance. Once I’ve worked out how to filter these out, I will.

Still to come

All sorts of crazy stuff.

Let me know how it works out if you use it.

8 Responses to “Guardian for iPad”

  1. You’re not serving any of their ads?

  2. Paul Haine says:

    Ads are on the to-do list.

  3. What do you mean by “wacky Android-based”?

    Admittedly whenever I go out in public carrying my wacky Android-based table I wear a clown outfit and keep tripping up over my massively over-sized shoes, but still, I resent the comment.

  4. “tablet” misspelt in last comment… the shame…

  5. Paul Haine says:

    Am willing to retract accusation of wackiness purely on the grounds that you have an amazing name. Though the idea of someone carrying around an Android-based table fills me with joy.

  6. John Doe says:

    “… ads on the to do list”?

    Doesn’t that break the terms of the Graun’s Open Platform?

    Very clever nonetheless.

  7. Paul Haine says:

    Guardian staff are aware of this, I’m waiting to hear back from them about what they want me to do.

  8. Anura says:

    Love the guardian, and for the first time I can read it in a way that’s comfortable on th iPad.

Writer of

HTML Mastery joeblade

Technical reviewer of

HTML and CSS Web Standards Solutions Pro CSS and HTML Design Patterns Advanced CSS