Wednesday, November 30, 2011

Heroku, jQTouch, iPhone Fullscreen Image Refresh Issues

Alright so today things were going pretty well with development on my open mic community app so I decided to work on some of the graphics. After spending some time deciding on what I wanted to change, I came up with some graphics I was happy with.

App Background: Ruby on Rails 3 app, hosted on Heroku with JQTouch for iPhone UI.

So I updated my local git repository, pushed it to github, and then to heroku. Since I've been testing my app a lot, I already had it added to my homescreen. So I hit the Homescreen icon which launched my fullscreen webapp - but my new images weren't showing up.

So to debug, I decided to launch safari and navigate to my page - the new images were showing up there. That's weird - because it was my understanding that the fullscreen iOS webapp was just Mobile Safari without the address bar and controls at the bottom.

So it's really weird that it was rendering the new images in Mobile Safari but not from my shortcut. So I decided to delete my homescreen shortcut. I navigated to my page (in Mobile Safari where the new images showed up) - and added a shortcut to my homescreen.

I tapped the homescreen icon - and still nothing! The old images were still coming up. I cleared my cache and HTML data - and still nothing.

I was getting quite frustrated and decided to leave it alone and figure it out later.

I came back to my app a few hours later - and boom - the new images had loaded!

So turns out it was just a matter of time. I have no idea what's being cached and where. Didn't seem to be an issue with Heroku nor with Rails since Mobile Safari was rendering it properly. It seems to be iOS's fullscreen app runner that was doing some caching somewhere.

So long story short - if this happens to you - just wait a while - the refresh should happen.

No comments: