Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Adding "App Saving" Prompts to your Website


An example - Simple Button


Show this app saving widget when a user presses a certain button, in this case, "Install App" button.

<!-- Custom button anywhere on the page -->

<button onclick="pwaless.showWidget('main')">Install App</button>


You can call these widgets anyway you see fit, for example, based on user actions (like a button) or using timers and as a part of a workflow, like "Something is added to a shopping cart"


An example - Auto Hiding Button


It is the same button, but it will hide if a user visits your website and already has the application installed.

...

The only difference with the previous example is an HTML attribute added: <button pwaless onclick ...

<!-- Custom button anywhere on the page -->

<button pwaless onclick="pwaless.showWidget('main')">Install App</button>


NOTE - the attribute "pwaless" will work just as well on any other HTML element, as it does on buttons.

Recommended Use


It makes sense to keep the "App Saving" abilities of your website visible, so people can share it, in places like the bottom block of your website. So do not add the "pwaless" attribute.

...