Month: December 2012

I’ve been waiting to upgrade my iPhone 4S to iOS 6 until there was a maps app available other than the new native one that Apple built. And by ‘other’ I really mean one from Google. I only use maps for directions about half the time; the other half is spent searching, which is precisely where the Apple app falls down hard. So it was with great pleasure that I installed the official Google native maps app shortly after it was released. It’s beautiful, and definitely works as well as the pre-iOS 6 one. A couple days after loading it I pulled the iOS 6 trigger. Everything I used on a regular basis was working great…or so I thought.

I use my bookmark browser every day. It has an option to refresh bookmark data each time you start a new session, but I’m not using it at the moment. That means I must manually refresh the data, which I do every week or so. But after the OS upgrade the refresh process started acting weird. Normally it takes a few seconds to get the data from Mozilla Sync. Once the data is downloaded the last refresh timestamp is updated along with the total bookmark count. What was happening is the refresh seemed to happen instantly. It would update the timestamp but the count never changed. I knew this was not right because I happened to do a bunch of bookmark organizing and the number should have been very different.

I found that clearing all website data for Safari would allow the refresh to work properly. But that blows away any data from other web sites, which is bad. I finally got annoyed enough that I opened up the code to see if maybe I was doing something wrong. My investigation lead to the cause of the problem: Apple had messed up again.

Here is what seems to be happening, based on this really popular question at Stack Overflow: Apple is servicing POST requests from its cache rather than sending them to the server if no cache-control header is included and the request data is unchanged. It appears to be a bug. The AJAX call the bookmark browser makes to the server uses the same parameters each time: username, password and key. So the browser was basically not making the call to the server, and my post-request code was executing as if it had.

The solution was to set the ‘cache-control’ header in the POST to ‘no-cache’. It seems to have solved the problem. The good news is an official fix is supposed to be in the up-and-coming iOS 6.1. It seems like version 6 is on track to be the most problematic iOS release yet.

Musing