Reputation: 25239
Is it possible to push update on the favicon (ex. apple-touch-icon.png) on a web-mobile app for iOS? I mean, I saw a weather app that uses the actual app icon to update the temperature...
is it possible in your html5 web app (saved to your home screen)?
to be precise i just saw it working on this web app: pattern.dk/sun and their icon displays exactly the realtime temperature, is that just a trick maybe??
UPDATE The icon doesn't really update in real-time but only when you open and closes the app. still interesting though.
Upvotes: 3
Views: 1192
Reputation: 943
As of iOS 7.1 the web app icon seems to update even if the filename is the same.
Upvotes: 0
Reputation: 25239
I think I found the trick
i'm adding a time stamp to the icon filename like:
<link rel="apple-touch-icon-precomposed" href="favicon.png?<?php echo $date->format('U'); ?>" />
//this is a PHP piece of code but you generat a timestamp in any way you want
so anytime you open the boomark the icon app refresh itself
Upvotes: 2