web clip icon when offline

23 views
Skip to first unread message

Simon

unread,
Jun 22, 2010, 11:49:06 AM6/22/10
to iPhoneWebDev
Hi,

I have a question about the web clip icon. I have things set up in my
app so that the icon I specify shows up when i choose the "Add to Home
Screen" option, but only when I'm online. If I go offline and then
try to add it to the home screen, I end up with a screenshot of the
current screen. I have tried preloading the icon image, adding it
into a hidden div so that it is actaully on the page, and it is listed
in my cache manifest file, so it should be getting pulled down by
that. Does the icon only get pulled down from the server when the you
actually choose to add the app to the home screen? If I add it, and
then go offline and try to add it again, the proper icon does appear.
Has anybody found a way to force the load of the icon image without
actually needing to add the app to the home screen once?

Thanks,

Simon

Webmaster, Team Associated

unread,
Jun 23, 2010, 11:43:56 AM6/23/10
to iphone...@googlegroups.com

Simon,

Can you provide the code that allows the creation of the web clip icon?

 

Thanks!

Steve

Simon

unread,
Jun 23, 2010, 1:49:54 PM6/23/10
to iPhoneWebDev
Hi,

I'm just using the <link rel="apple-touch-icon-precomposed" href="/
myPath/myIcon.png" />

This works fine when I'm online, my issue is that if I'm offline the
icon doesn't get loaded, even if I hide it on the page I am trying to
add to the home screen. So I'm wondering if that tag requires an
active connection to download the image, or if it can be preloaded in
some way so that if you load the page, then go offline, and then add
it to the home screen, the proper icon is used, instead of the screen
shot of the current page.

Thanks,

Simon

On Jun 23, 8:43 am, "Webmaster, Team Associated" <shust...@aeteam.net>
wrote:

Mogens Beltoft

unread,
Jun 23, 2010, 3:12:47 PM6/23/10
to iphone...@googlegroups.com
So you want to go offline, and then Save to Home Screen. Why, if I may ask?

How would you make sure that all files in your manifest are present and
ready for local storage when offline?

/Mogens

Simon

unread,
Jun 24, 2010, 12:27:05 PM6/24/10
to iPhoneWebDev
What I want to be able to cover is the case where a user is first
online and loads up my app in safari. In doing so, the manifest file
is loaded along with all the other relevant files. If the user then
goes offline, they can continue to use the app in safari, and safari
still provides the option to "Add to Home Screen'. However, when you
choose this in offline mode, the proper icon isn't used, just a
screenshot is. I realize this probably isn't likely to be how most
people would use the functionality, but I figure that if Apple allows
you to add it to the home screen when offline, then there should also
be a mechanism to use the proper icon without needing to fetch it from
a live server at that exact time (which would never happen
successfully if you are offline).

Simon

Jordan Dobson

unread,
Jun 24, 2010, 1:43:56 PM6/24/10
to iphone...@googlegroups.com, iPhoneWebDev
You could always base64 encode the image. The upside is that there would be no delay loading the icon for users that are online.

I don't think Safari goes to grab the icon until its needed. So I believe base64 encoded into your page is the only option.

Jordan

> --
> You received this message because you are subscribed to the Google Groups "iPhoneWebDev" group.
> To post to this group, send email to iphone...@googlegroups.com.
> To unsubscribe from this group, send email to iphonewebdev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
>

Reply all
Reply to author
Forward
0 new messages