Tags: ipad



100 words 082

Apple launched the iPad five years ago. A few months after its release, I bought one of those first-generation iPads. I used it for a while before concluding that, much as I had suspected, it wasn’t the right device for me. But it was the perfect device for my mother. So I gave the iPad to my mother.

Sure enough, it worked out great for her. But now it’s getting quite long in the tooth. So now I’ve given her a new iPad for her birthday; one that’s lighter, faster, and—crucially—comes with a camera. It’s a Facetime device.

Orientation and scale

Paul Irish, Divya Manian and Shi Chuan launched Mobile Boilerplate recently—a mobile companion site to HTML5 Boilerplate.

There’s some good stuff in there but I was a little surprised to see that the meta viewport element included values for minimum-scale=1.0, maximum-scale=1.0, user-scalable=no:

Setting user-scalable=no is pretty much the same as setting minimum-scale=1.0, maximum-scale=1.0. In any case, I’m not keen on it. Like Roger, I don’t think we should take away the user’s right to pinch and zoom to make content larger. That’s why my usual viewport declaration is:

Yes, I know that most native apps don’t allow you to zoom but I see no reason to replicate that failing on the web.

But there’s a problem. Allowing users to scale content for comfort would be fine if it weren’t for a bug in Mobile Safari:

When the meta viewport tag is set to content="width=device-width,initial-scale=1", or any value that allows user-scaling, changing the device to landscape orientation causes the page to scale larger than 1.0. As a result, a portion of the page is cropped off the right, and the user must double-tap (sometimes more than once) to get the page to zoom properly into view.

This is really annoying so Shi Chuan set about fixing the problem.

His initial solution was to keep minimum-scale=1.0, maximum-scale=1.0 in the meta viewport element but then to change it using JavaScript once the user initiates a gesture (the gesturestart event is triggered as soon as two fingers are on the screen). At the point, the content attribute of the meta viewport element gets updated to read minimum-scale=0.25, maximum-scale=1.6, the default values:

var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
  document.addEventListener("gesturestart", gestureStart, false);
  function gestureStart() {
    for (i=0; i<metas.length; i++) {
      if (metas[i].name == "viewport") {
        metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";

That works nicely but I wasn’t too keen on the dependency between the markup and the script. If, for whatever reason, the script doesn’t get executed, users are stuck with an unzoomable page.

I suggested that the script should also set the initial value to minimum-scale=1.0, maximum-scale=1.0:

var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
  for (i=0; i<metas.length; i++) {
    if (metas[i].name == "viewport") {
      metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
  document.addEventListener("gesturestart", gestureStart, false);
function gestureStart() {
  for (i=0; i<metas.length; i++) {
    if (metas[i].name == "viewport") {
      metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";

Now the markup still contains the robust accessible default:

…while the script takes care of initially setting the scale values and also updating them when a gesture is detected. Here’s what’s happening:

  1. By default, the page is scaleable because the initial meta viewport declaration doesn’t set a minimum-scale or maximum-scale.
  2. Once the script loads, the page is no longer scalable because both minimum-scale and maximum-scale have been set to 1.0. If the device is switched from portrait to landscape, the resizing bug won’t be triggered because scaling is disabled.
  3. When the gesturestart event is detected—indicating that the user might be trying to scale the page—the minimum-scale and maximum-scale values are updated to allow scaling. At this point, if the device is switched from portrait to landscape, the resizing bug will occur because the page is now scaleable.

Jason Weaver points out that you should probably detect for iPad too. That’s a pretty straightforward update:

if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i))

Mathias Bynens updated the code to use querySelectorAll which is supported in Mobile Safari. Here’s the code I’m currently using:

if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i)) {
  var viewportmeta = document.querySelector('meta[name="viewport"]');
  if (viewportmeta) {
    viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0';
    document.body.addEventListener('gesturestart', function() {
      viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6';
    }, false);

You can try it out on Huffduffer, Salter Cane, Principia Gastronomica and right here on Adactio.

Right now there’s still a little sluggishness between the initial pinch-zoom gesture and the scaling; the scale values (0.25 - 1.6) don’t seem to take effect immediately. A second pinch-zoom gesture is often required. If you have any ideas for improving the event capturing and propagation, dive in there.

Update: the bug has been fixed in iOS 6.

Super-Toys Last All Summer Long

When I was in Boston for An Event Apart back in May, I bought an .

That makes it sound like a very casual act. Back then, iPads were in very short supply. When I asked an employee at the Apple Store in Boston if they had any iPads in stock, he didn’t answer Hmm… let me check, or Not at the moment. He answered Oh, God no!

Fortunately, Malarkey was far more persistent than I and managed, through means fair or foul, to track down the only two iPads for sale in all of Beantown.

I used the device for two months and then, as predicted, I gave it to my mother. It was definitely the right decision. She loves it. She’s using it all the time, surfing the web wherever she pleases.

I liked using the iPad, but I didn’t love it. Once the novelty wore off, I found I had few good reasons to use it rather than use my Macbook.

Some observations from a Summer spent in the company of the iPad…

The iPad is almost exactly the wrong weight. It’s just that little bit too heavy to comfortably hold in one hand. It’s no coincidence that all of iPad demonstrations show it resting on a raised leg. I found that if I was using the iPad for any length of time, I would adopt a more and more relaxed, nay… slouchy position. Before I knew it, I was supine on the sofa, one leg raised with the iPad resting against it, like a Roman emperor waiting to be fed individually-peeled grapes.

The iPad is a great device for reading. I rediscovered the power of RSS. The iPad is also a great device for browsing the web. The problem is, I don’t really browse the web that much. Instead, I browse, I bookmark, I quote, I huffduff, I copy, I paste, I tweet, I share. Using an iPad made me realise that the web is very much a read/write medium for me. While it’s possible to do all those things on the iPad, it isn’t easy.

The tell-tale moment came when I was reading something on the iPad—supine on the sofa, of course—that I wanted to post to Delicious. Rather than fill in a form using the iPad’s on-screen keyboard, I found myself putting the iPad down and reaching for my Macbook just to accomplish that one little task. That’s when I knew it wasn’t the ideal device for me.

Don’t get me wrong: I’m not joining in the chorus of those silly enough to say that the iPad can’t be used for creating, editing and updating. That conclusion would be far too absolute and Boolean. But I think the iPad favours consumption more than creation. And that’s okay. That still makes it a great device for many people—such as my mother.

There’s one big fly in the ointment of the iPad as a device for non-geeks—such as my mother—and that’s the out-of-the-box experience. John Gruber pointed this out in his review of the iPad:

One thing that is very iPhone-like about iPad is that when you first take it out of the box, it wants to be plugged into your Mac or PC via USB and sync with iTunes. … It creates an impression that the iPad does not stand on its own. It’s a child that still needs a parent. But it’s not a young child. It’s more like a teenager. It’s close. So close that it feels like it ought to be able to stand on its own.

My mother has an old G3 Ruby iMac which doesn’t have USB 2, so I had to set up the iPad on my machine before giving it to her. It’s such a shame that this step is even necessary. I love the idea of a portable touchscreen device that you can simply turn on for the first time, connect to a WiFi network, and start surfing the web.

Perhaps later versions of the iPad will support account synching via . Perhaps later versions of the iPad will support multiple accounts, which would make it a great family household device. Perhaps later versions of the iPad will have a front-facing camera and support FaceTime. Perhaps later versions of the iPad will be slimmer and lighter.

Perhaps I will get a later version of the iPad.

The iPad and the web

Before Apple launched the , I managed to refrain from adding to the deluge of speculation and rumour. Now that the much-anticipated tablet has been unveiled, I can’t resist jotting down my thoughts.

Now, this is just my reaction to a piece of technology. I feel a need to clarify that because discourse on the internet has a strange way of getting warped. Someone says I like Italian food, and someone else responds with Why do you hate Mexican food? Someone says I enjoyed watching Avatar, and someone else hears Everyone should enjoy watching Avatar. So bear in mind that this is just my personal reaction. I’m not saying that everyone should share my feelings. ‘Twould be a very dull world indeed in which we all felt the same.

I didn’t watch Steve Jobs unveiling the iPad—I was busy learning at a Skillswap event—but when I was reading up about it afterwards, I thought to myself I’m probably going to get an iPad…

Actually, at this point I need to take care of something:

Mum, if you’re reading this, could you stop now please? Thanks. Love you.

Anyway, as I was saying, I thought to myself I’m probably going to get an iPad …for my mother.

Honestly, there isn’t much on offer in the iPad that I don’t already have in my Macbook. I don’t think it is the device for me. But it is most definitely the device for my mother. I don’t mean “a theoretical persona such as one’s mother,” I mean my mother.

My mother is currently using a that used to belong to me. When she started using this machine, she had never used a keyboard, much less a computer. I am very, very glad that her first computer was a Mac and that she’s never had to deal with the world of pain that is Windows, but even a Mac has a learning curve for someone who’s never used a computer before.

I remember explaining what the cursor was and how the mouse controlled it. When I said “move it up”, she lifted up the mouse off the table. Thinking about it, the mouse isn’t as straightforward as we think: moving the mouse left and right does map to moving the cursor left and right, but moving the mouse forward and backward maps to moving the cursor up and down. Both the cursor and the mouse move on two-dimensional surfaces but only half the movements of the mouse correspond directly to movements of the cursor.

In computer years, a G3 iMac is ancient. It’s amazing that it still runs at all. I’ve been thinking for a while now about what would make a suitable replacement. A newer iMac would be good but they’re a little pricey for something that’s going to be used for web surfing, email, some digital photography and little else. A laptop would be nice. Now that my mother has WiFi, there’s no need for her to have to remain in one place to use her computer. But laptops are fiddly things with fiddly trackpads.

The iPad strikes me as the Goldilocks solution. It’s just right. If the European pricing follows the general Apple conversion rate, the iPad should be pretty darn affordable. It would be nice if it came with an iSight for iChatting; that might well get added in a later version. Web surfing, email and photo browsing are all not just possible, but likely to be pleasurable. That’s because the multitouch control mechanism is likely to feel far more intuitive than either a mouse or a trackpad. (Caveat: I haven’t used an iPad. Take my opinion, and the opinions of anyone else who hasn’t actually used one, with a heaped tablespoon of salt.)

So I’m probably going to get an iPad, but for someone else. If it came with nothing more than a WiFi connection and a web browser, it would still be a worthwhile device for my mother. In fact, the idea of using a computing device based around a browser is what’s driving the . Google’s vision is one wherein the file system and the hard drive are far less important than the web browser and the web server.

That’s why I’m slightly mystified about the App Store grumblings. Yes, it’s a closed system that Apple controls completely. But the same devices that support the App Store also come with a very advanced web browser. Personally, I think that if a device is capable of running HTML, CSS and JavaScript, I don’t think it can be described as “closed”.

Don’t like the closed nature of the App Store? Don’t use it. Use the web instead. That’s the point that PPK was making, albeit a bit stridently. Admittedly, if you want to make money directly from an app, you might have a harder time of it on the web than on the App Store. Make your app distribution bed and lie in it.

I’ve already seen people on Twitter sharing some ideas for the uses to which the iPad could be put:

  • displaying sheet music on a music stand,
  • showing recipes on a kitchen worktop,
  • playing scrabble, sudoku and crosswords,
  • reading comics,
  • reading magazines a la Mag+,
  • reading books in a way that doesn’t involve the silly page-turning visual metaphor built into the iBooks app.

All of those are great ideas and all of them can be implemented on the web. Remember that Mobile Safari already has excellent support for canvas, audio, video and offline storage. No App Store required. As Simon St. Laurent puts it, web developers can rule the iPad.

I understand the concerns of my fellow geeks who see the read-only nature of the iPad as restrictive compared to the read-write nature of laptop and desktop computers. Rafe Colburn asks Is the iPad the harbinger of doom for personal computing?:

I think that it’s a real possibility that in 10 years, general purpose computers will be seen as being strictly for developers and hobbyists.

Alex Payne foresees a tinkerer’s sunset:

The thing that bothers me most about the iPad is this: if I had an iPad rather than a real computer as a kid, I’d never be a programmer today.

While I understand and to a certain extent, share these forebodings, I’m cautiously optimistic that these fears won’t be realised. The iPad isn’t going to replace laptop or desktop computers; it’s a different kind of machine for a different kind of user.

Frasier Spiers welcomes the glimpse that the iPad offers us of information processing dissolving into behaviour when he writes:

If the iPad and its successor devices free these people to focus on what they do best, it will dramatically change people’s perceptions of computing from something to fear to something to engage enthusiastically with. I find it hard to believe that the loss of background processing isn’t a price worth paying to have a computer that isn’t frightening anymore.

Nik agrees:

Yes, it’s an entirely prescriptive way of computing - one that the hackers, tinkerers and geeks will find alien and protest about its lack of openness. But here’s the thing: for the people who the iPad is aimed at it really doesn’t matter that this experience is prescriptive.

I think he’s right. The iPad isn’t for geeks but I can foresee geeks, like me, buying iPads for members of their family …if for no other reason than to reverse the trend of the holiday season becoming the tech support season.

I’m not usually one for predictions, but I think I’ll try my hand at one now. The iPad will be the best-selling device to be purchased as a gift for Christmas 2010.