One of my most common feature requests is for Instapaper to periodically download articles in the background. A lot of people forget to launch the app to let it download content before going underground or boarding a plane.

I’ve already received multiple emails from people who are excited for iOS 4’s multitasking because they can’t wait for this to finally stop being an issue, because they think Instapaper will be able to download articles periodically in the background.

It’s painful to respond, crushing their hopes, to tell them that the iOS multitasking system doesn’t allow me to do that.

By naming these features “multitasking”, Apple has set customers’ expectations to include what apps can do in a traditional computer multitasking environment.

It’s going to mislead people into expecting such behavior from apps, but we can’t actually deliver most of it.

Some people will notice that no apps can do these things and properly focus their disappointment on Apple. But many others will only notice the shortcomings in one particular app that they need to do the “impossible” and blame that application, leading to dissatisfaction and negative thoughts about the app.1

As long as iOS “multitasking” can do much less than traditional multitasking — which will probably always be the case — this is going to be an issue.

Proposed solution: A new multitasking type

The addition of one more multitasking service would solve this issue for a lot of application types: a periodic network request. Here’s how I would do it:

The application gives the system an NSURLRequest and an ideal refresh interval, such as every 30 minutes, every few hours, or every day.

iOS executes that request, whenever it deems that it should, and saves the response to a local file.

Next time the application launches, iOS hands it an NSData of the most recent response.

Executing the request “whenever it deems that it should” is important. iOS can decide, for instance:

Not to update when the battery is low, connectivity is poor, other requests are running, free memory is low, CPU usage is high, or the user is predicted to exceed their monthly data limit.

Not to update as frequently as the app requests, or to increase the interval over time, or to dynamically adjust the interval based on how often it receives a 304 (Not Modified) response.

Not to update at all if the requesting app has not been launched in a long time.

This would allow Instapaper to download updates in the background, and would also greatly benefit RSS readers, Twitter clients, chat programs, weather and news widgets, and a huge number of other applications that currently can’t get much benefit from iOS’ multitasking.