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.
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
从iOS 7.1开始,即使文件名相同,Web应用程序图标也会更新。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.