Service Workers: Difference between revisions

From Joomla! Documentation

No edit summary
m Code cleaning
Line 3: Line 3:
This is a discussion document to work out the best practice to implement Progressive Web App manifest files and the implementation of service workers.
This is a discussion document to work out the best practice to implement Progressive Web App manifest files and the implementation of service workers.


The idea is to support the manifest and service worker generation dynamically.
The idea is to support the manifest and service worker generation dynamically.<br />
The scope it to support the following features:-
The scope it to support the following features:-


Offline Navigation
*Offline Navigation
Advanced Cache
*Advanced Cache
Splash screen
*Splash screen
Lazy (Background) Loading
*Lazy (Background) Loading
Web Push Notifications
*Web Push Notifications
Theming
*Theming
Home Screen Management
*Home Screen Management


=== Web App Manifest  ===
=== Web App Manifest <ref>https://www.w3.org/TR/appmanifest/</ref> ===


<ref>https://www.w3.org/TR/appmanifest/</ref>
#system/manifest: $document->addCustomTag('<link rel="manifest" href="' . $base . '/index.php?option=com_ajax&plugin=joocialWebpushManifest&format=raw">');
 
#ajax/manifest: Generator class
1.system/manifest: $document->addCustomTag('<link rel="manifest" href="' . $base . '/index.php?option=com_ajax&plugin=joocialWebpushManifest&format=raw">');
##template - params
 
##wam/ component listener plugin
2. ajax/manifest: Generator class
##json output
 
#Service Worker Geneation: event hub
  2.1 template - params
##wam/ listener plugin: JDocument->addServiceWorker
 
##JS Hub initilization
  2.2 wam/ component listener plugin
 
  2.3 json output
3. Service Worker Geneation: event hub
 
  3.1: wam/ listener plugin: JDocument->addServiceWorker
 
3.2: JS Hub initilization

Revision as of 11:57, 19 November 2017

Service Worker Specification

This is a discussion document to work out the best practice to implement Progressive Web App manifest files and the implementation of service workers.

The idea is to support the manifest and service worker generation dynamically.
The scope it to support the following features:-

  • Offline Navigation
  • Advanced Cache
  • Splash screen
  • Lazy (Background) Loading
  • Web Push Notifications
  • Theming
  • Home Screen Management

Web App Manifest [1]

  1. system/manifest: $document->addCustomTag('<link rel="manifest" href="' . $base . '/index.php?option=com_ajax&plugin=joocialWebpushManifest&format=raw">');
  2. ajax/manifest: Generator class
    1. template - params
    2. wam/ component listener plugin
    3. json output
  3. Service Worker Geneation: event hub
    1. wam/ listener plugin: JDocument->addServiceWorker
    2. JS Hub initilization