Re: Creating a home screen "web app" for smart phone

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for all the responses.  I was hoping to stay away from _javascript_ or a framework for this, as it’s just a simple script for myself.  I’ll look into REST and Ember for future use, but for now I found a super simple fix.

I used a little _javascript_ snippet for all the links and that makes the entire script usable as a PWA.  As an example, I replaced links like:

<a class="nav-link" href="">"<?php echo 'purchases.php?'.$params ?>">Purchases</a>

with:

<a class="nav-link" href="">Purchases</a>

<script>
  function ahref_go(url) {
      window.location.assign(url);
  }
</script>


 This allows multiple pages to work as a single Add To Homescreen web app on the iPhone.  It works the same as a full <a href> page refresh, but it prevents Mobile Safari from jumping out of full-screen mode.

Thanks again,
Frank

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux