1

Since iOS 13 (perhaps also at the end of iOs 12...) the webapps in fullscreen mode doesn't seems to refresh themselves when the user open it by clicking the icon on the iPhone homescreen...

See this video to see the 2 test cases below in live : https://tooliphone.net/temp/stackoverflow_58342896.mp4

Test case 1 : not in fullscreen

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<script type="text/javascript">
    alert("test / IT IS in fullscreen !");
    var today = new Date();
    var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
    var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
    var dateTime = date+' '+time;
    document.write(dateTime);
</script>
</body>
</html>
  • Visit this page on iOS / safari: https://dev.icustom.tooliphone.net/test
  • Add it to the home screen (share button / add to home screen)
  • Click the home screen icon: alert displayed / current date displayed (immediatly)
  • Click the home screen icon AGAIN: alert displayed / current date updated (immediatly)

Test case 2 : IT IS in fullscreen

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
</head>
<body>
<script type="text/javascript">
    alert("test / IT IS in fullscreen !");
    var today = new Date();
    var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
    var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
    var dateTime = date+' '+time;
    document.write(dateTime);
</script>
</body>
</html>

Note the new line here to be installed as a webapp on the homescreen ("fullscreen"):

<meta name="apple-mobile-web-app-capable" content="yes" />
  • Visit this page on iOS / safari: https://dev.icustom.tooliphone.net/test2
  • Add it to the home screen (share button / add to home screen)
  • Click the home screen icon: alert displayed / current date displayed (after a few seconds...)
  • Click the home screen icon AGAIN: alert NOT displayed / current date NOT updated

The only way seems to be to kill the webapp on the iOS task manager and launch it again...

Question

Is there a way to force the webapp in fullscreen to refresh itself at launch (each time the user clicks on the home screen icon)?

I tried to relaod the page in javascript but of course as the alert doesn't executes, this kind of code neither...

window.location.reload();

thank you in advance, this drives me crazy!

TooLiPHoNe.NeT
  • 479
  • 1
  • 5
  • 22
  • I tried it. It works fine with me.Where do you call the reload function? – Ramy Rizkalla Oct 11 '19 at 19:38
  • I don't call in in the above examples but I tried and it doesn't relods the page for test case #2. BTW as the alert is not fired, no Javascript code seems to be executed at all. In fact the page is not updated at all. see the video I made for details : https://tooliphone.net/temp/stackoverflow_58342896.mp4 – TooLiPHoNe.NeT Oct 13 '19 at 10:38
  • Did you try this (admittedly old) suggestion? https://stackoverflow.com/questions/8792255/how-do-you-force-an-ipad-home-screen-bookmarked-web-app-to-refresh – Joel Anderson Mar 22 '20 at 19:34

0 Answers0