The essential news about content management systems and mobile technology.
Powered by Joocial, XT Search for Algolia, and SlimApps.

logo

What is XT Workbox for Joomla?

XT Workbox for Joomla! provides a solution toimplement on a Joomla site.

What is to Workbox?

Workbox is a collection of JavaScript libraries for
.

Offline Caching: Workbox helps you add offlinecaching support to your website. This enables it to work offline onrepeat views and ensures your site is resilient to spotty networkconditions.

Offline Analytics: Workbox can collect useranalytics while offline and send them to your Google Analyticsaccount when a connection becomes available.

Visit to learn more about what Workbox
can do for you.

Highly Experimental

At this time, Service Workers are correctly working on Chromeand Firefox. However, Safari and Microsoft Edge support is coming,but not ready yet. For more information:

Given said that, this package is mainly a working proof ofconcept.

Highly Experimental

Contents

We have completed the initial development of XT Workbox forJoomla. The extension installs and enables two plugins:

  • System - XT Workbox
  • Ajax - XT Workbox

In the system plugin, you can find the main configurationoptions. At this time, these are the available recipes:

  • Cache Css And Java Script Files
  • Caching Images
  • Caching Content From Multiple Origins
  • Google Fonts

They implement the same recipes found in the Workbox site:https://developers.google.com/web/tools/workbox/guides/common-recipes

This is how the Caching Images recipe is defined;

workbox.routing.registerRoute(/\.(?:png|gif|jpg|jpeg|svg)$/,workbox.strategies.cacheFirst({    cacheName: 'images',    plugins: [    new workbox.expiration.Plugin({        maxEntries: 60,        maxAgeSeconds: 30 * 24 * 60 * 60, // 30 Days    }),    ],}));

Once you install it on the testing site, you must add thisheader definition in the .htaccess:

        Header set Service-Worker-Allowed "/"

The expected result of the extension implementation isconfirming that the assets are managed by the service workerstrategy that you define in the plugin configuration.

For example, we have enabled Cache Css And Java ScriptFiles recipe on this demo site:https://blog.anibalhsanchez.com, If you inspect the page withChrome Dev Tools, you can confirm that in the first-page load, theconsole shows this message:

Yay! Workbox for Joomla! is loaded - Recipe Cache Css And Java Script Files

Then, in the next page loads, Css and Java Script Files areserved by the Service Worker.

How to contribute

The package is published on Github at . Feel free to clone,fork, modify, open issues, submit PRs, etc.

Requirements

  • Joomla 3, or superior
  • SSL-enabled site

License

XT Workbox for Joomla

Copyright 2018 Extly, CB.

Licensed under the ;
you may not use this file except in compliance with the License.You may
obtain a copy of the License at

Unless required by applicable law or agreed to in writing,software
distributed under the License is distributed on an "AS IS"BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
See the License for the specific language governing permissionsand
limitations under the License.

Workbox

Copyright 2018 Google, Inc.

Licensed under the ;
you may not use this file except in compliance with the License.You may
obtain a copy of the License at

Unless required by applicable law or agreed to in writing,software
distributed under the License is distributed on an "AS IS"BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
See the License for the specific language governing permissionsand
limitations under the License.

Read more